set_timeout
- Calls a script after specified delay.
Edit
Edit
fields | type | description |
---|---|---|
delay | number | The time, in milliseconds (thousandths of a second), the timer should wait before the specified script is executed. Note that the actual delay may be longer |
script | string | A script to be executed after the timer expires |
args | table | Parameters which are passed through to the script. Note timeId will be added to args table |
Edit
fields | type | description |
---|---|---|
timer_id | string | ID which uniquely identifies the timer |
Edit
local timer = require("timer")
local timer_id = timer.set_timeout(1000, "HUB:module_name", { arg_name = "arg_value" })