This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== SetTimer ==== Set a timer or interval === Description === <code>SetTimer( timernumber, timeout, parameter=0, repeat=0 )</code> Set up a timer with a timeout (in milliseconds) and an optional user supplied parameter. There are four independent timers available to each script. After the given timeout, the "@Timer" event handler function will be called. To cancel a timer, simply set the interval to 0 like this: ''SetTimer(0, 0)'' === Parameters === | ''timernumber'' | Timer number 0-3 | | ''timeout'' | Timeout in milliseconds, 1-3600000 (1h max) | | ''parameter'' | User defined value | | ''repeat'' | Number of times to repeat the timer (0-1000), or ''TIMER_INF'' for infinite | === Return value === none === Example usage === <code javascript> main() { SetTimer(0, 5000, 1234, TIMER_INF); // Set up timer to call back every 5 seconds } @Timer(timerno, timeout, param) { // Code to run every time the timer expires } </code> ezeio2/scriptref/settimer.txt Last modified: 2019-11-19 00:02by andreh Log In