debug of timer function