[][src]Function hexchat::add_timer_task

pub fn add_timer_task(
    interval: Duration,
    task: impl Fn() + 'static
) -> TimerTask

Registers a task to be run repeatedly with a specified interval.

Returns a corresponding object suitable for passing to remove_timer_task.

Note

Right now the interval cannot be more than i32::max_value() milliseconds. If it is more than i32::max_value() milliseconds, it will be truncated to i32::max_value() milliseconds. This restriction will be lifted in the future.