> Assuming that the heat of the sun has been kept up by meteoric bodies falling into it, it is possible from the mass of the solar system to determine approximately the period during which the sun has shone. The limits lie between 100 millions and 400 millions of years.
I don't know how the mass of the solar system figures in their calculation, but you can say that the total mass of meteorites so far must be less than the current mass of the sun.
The energy of a meteorite falling into the sun should be about 1/2 its escape velocity squared.
>>> sun_escape_vel = 617.5e3 # m/s
>>> sun_infall_energy = 0.5 * sun_escape_vel**2 * sun_mass # kg m/s^2 or J
>>> sun_infall_energy / sun_output / year
31586055.04077674
(This is a loose upper bound, because I'm assuming the same escape velocity the whole time but the sun would have started at lower mass.)
So mass falling into the sun could sustain its output for 31 million years.
Numbers from https://en.wikipedia.org/wiki/Sun and https://en.wikipedia.org/wiki/Energy_density