Implemented method getTotalTime.