get_arguments
- Get timer arguments by ID. Gets nil if timer doesn’t exist.
Edit
Edit
fields | type | description |
---|---|---|
timer_id | string | ID which uniquely identifies the timer |
Edit
fields | type | description |
---|---|---|
args | table | If timer doesn’t exist result is nil |
Edit
local timer = require("timer")
timer.set_interval_with_id(1000, "timer_id", "HUB:module_name", { arg_name = "arg_value" })
local args = timer.get_arguments("timer_id")
assert(args)
print(args.arg_name)