Improve cycle time calculation in ProgressBar