Corrected rounding error in calculating time intervals.