How to use the timer function