set_interval_with_id
- 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 |
| timer_id | string | ID which uniquely identifies the timer (No timer will be created, if timer with specified timer_id exists) |
| 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 |
|---|---|---|
| none |
Edit
local timer = require("timer")
timer.set_interval_with_id(1000, "ID", "HUB:module_name", { arg_name = "arg_value" })