You can just use a global variable to toggle it off if you want. var is 0 as initial value. On every 1.0 seconds you have another condition if var=1. Then you have following events : on Play clicked, set var to 1 (starts the timer) If total_seconds=0, set var to 0 (stops the timer)