Add Timer class methods, and use Timer in tests.