This is the ThingsDB documentation for version v0, click here for the latest version!
Get timer arguments as a tuple.
The first argument for a timer closure is the timer_id. This timer_id
is not included
in the list of arguments.
This function does not generate an event.
timer_args(timer)
Argument | Type | Description |
---|---|---|
timer | int (required) | Timer to get the arguments for. |
Returns a tuple
with arguments.
This code will will be called every minute for 10 times and then it the timer will be removed.
timer = new_timer(
datetime().move('days', 1),
|timer, a, b| {
.sum = a + b;
},
[4, 6]
);
timer_args(timer);