set_interval
- Calls a script repeatedly, with a fixed time delay between each call.
Edit
Edit
| fields | type | description |
|---|---|---|
| delay | number | The time, in milliseconds (thousandths of a second), the timer should delay in between executions of the specified script. Note that the actual delay may be longer |
| script | string | A script to be executed every delay milliseconds |
| 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_interval(1000, "HUB:module_name", { arg_name = "arg_value" })