Simplify timer.cpp