Calculation of current time only when necessary