Refactoring the Timer method.