Fix elapsed time calculations.