Timer API

The Timer API allows processes to manage time-based operations within Kinode. This API provides a simple yet powerful mechanism for scheduling actions to be executed after a specified delay. The entire API is just the TimerAction:

#![allow(unused)]
fn main() {
pub enum TimerAction {
    Debug,
    SetTimer(u64),
}
}

This defines just two actions: Debug and SetTimer

Debug

This action will print information about all active timers to the terminal.

SetTimer

This lets you set a timer to pop after a set number of milliseconds, so e.g. {"SetTimer": 1000} would pop after one second. The timer finishes by sending a Response once the timer has popped. The response will have no information in the body. To keep track of different timers, you can use two methods:

Get Help: