This action is intended for scripts to create async timers. Note:
timers do not work with the batch HID (no callback issued ever).
Creates a timer that executes an action (by name) periodically.
Period is a real number specified in seconds. Internal timer
resolution is in the order of 0.1 second.
If repeat is not specified or is less than 1, the timer is repeated
indefinitely. If the optional userdata string is specified, it is
also passed to the action.
The action is specified only by a name, call arguments are always
the following:
- now: the current UNIX time in a floating point number
- integer: count back remaining number of calls, including the current call; 1 means this was the last call; 0 means infinite number of calls will follow
- userdata or empty string
Action shall return integer 0 on success.
If the action does not exist or returns anything else, the timer is
uninstalled.
There can be any number of timers in parallel.