Looping time counter

How do I get it to revert back to 0 and start again when it reaches a certain number? Thanks