Unit test for Timer
Small optimization Timer class