function setTimer (shared-side)
Available since version: 0.3.0
Creates a new timer that calls the given function at a fixed interval.
The timer passes any additional arguments to the callback when it executes. If execute_times is 0 or negative, the timer repeats indefinitely.
Declaration
int setTimer(function func, int interval, int execute_times, ... ...)
Parameters
functionfunc: Callback function executed by the timer.intinterval: Interval in milliseconds.intexecute_times: How many times to execute the callback (<= 0 means infinite).......: Additional arguments forwarded to the callback.
Returns int
Timer ID.