Now takes the total time estimated at the top if totalTime is not provided.