This is the ThingsDB documentation for version v0, click here for the latest version!

timer_args

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.

Function

timer_args(timer)

Arguments

Argument Type Description
timer int (required) Timer to get the arguments for.

Return value

Returns a tuple with arguments.

Example

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);