Added functions to compute cycle time.