Calculation of time gained