timer
utils.new_timer
Functions
start
local timer = utils.new_timer(100, function()print("This will be printed every 100ms")end)timer:start()
Usage:
Begins the timer.
stop
timer:stop()
Usage:
Pauses the timer.
run_once
local timer = utils.new_timer(100, function()print("This will be printed once")end)timer:run_once()
Usage:
Run a timer once.
is_active
local timer_active = timer:is_active()
Returns:
timer's state
boolean
set_delay
local timer = utils.new_timer(0, function()print("This will be run every 1000ms")end)timer:set_delay(1000)timer:start()
delay
number
the amount of ms to change the timer's delay to
Last updated