it follows the same basic syntax as mIRC, timer(interval, repitition) where interval is the interval between executions and repitition is the number of times its repeated(n<1 for infinite), also you can queue multiple callbacks to one timer by using add() method, i forgot to mention it in the example but you can also pass parameters in an array as a second param for add(). exec() simply executes the timer
it also throws an error if you create a timer that will take longer than max_execution_time allows the script to run for