  Massive stars (with mass m_* > 8 solar masses) are fundamental to the
evolution of galaxies, because they produce heavy elements, inject energy into
the interstellar medium, and possibly regulate the star formation rate. The
individual star formation time, t_*f, determines the accretion rate of the
star; the value of the former quantity is currently uncertain by many orders of
magnitude, leading to other astrophysical questions. For example, the variation
of t_*f with stellar mass dictates whether massive stars can form
simultaneously with low-mass stars in clusters. Here we show that t_*f is
determined by conditions in the star's natal cloud, and is typically ~10^5 yr.
The corresponding mass accretion rate depends on the pressure within the cloud
- which we relate to the gas surface density - and on both the instantaneous
and final stellar masses. Characteristic accretion rates are sufficient to
overcome radiation pressure from ~100 solar mass protostars, while
simultaneously driving intense bipolar gas outflows. The weak dependence of
t_*f on the final mass of the star allows high- and low-mass star formation to
occur nearly simultaneously in clusters.
