Approximately how long does the gravitational collapse phase last for a star similar to our Sun?

Answer

50 million years

For a star like the Sun, the phase driven primarily by gravitational contraction lasts for a considerable time, estimated around 50 million years, during which time the star releases its primary visibility energy.

Approximately how long does the gravitational collapse phase last for a star similar to our Sun?
starsgravityprotostarformationstar formationastrophysicsenergy generation