Added average calculation to timer.