Using the timer in a program