utils
Functions:
run_timer
utils.run_timer(delay: number, period: number, callback: function[, ...]): number
delay
number
Initial delay before executing the callback function in seconds.
period
number
Interval time between executing callback functions in seconds.
callback
function
Lua function to execute.
...
any
Additional arguments that will be passed to the callback function.
Creates a timer for repeated execution. Returns a task ID.
run_timer_once
utils.run_timer(delay: number, callback: function[, ...]): number
delay
number
Delay before executing the callback function in seconds.
callback
function
Lua function to execute.
...
any
Additional arguments that will be passed to the callback function.
Create a single execution timer. Returns a task ID.
cancel_timer
utils.cancel_timer(taskid: number): boolean
taskid
number
Task ID to be cancelled.
Cancels the specified timer task. Returns false
only when an exception is thrown.
Last updated