Create an asynchronous timer set on a specified interval. When the event is fired, the rx_handler will receive the event.
The named parameters
The interval the timer protocol will fire a CTimerEvent.
Identification for the protocol.
The receive handler for processing the event.
// Create a timer protocol that fires on a given intervallet timer = async_timer({ name: "timer", interval: 250, // 250 millisecond interval rx_handler: (evt) => { // Handle timer firing events. }});// Later when done.timer.terminate(); Copy
// Create a timer protocol that fires on a given intervallet timer = async_timer({ name: "timer", interval: 250, // 250 millisecond interval rx_handler: (evt) => { // Handle timer firing events. }});// Later when done.timer.terminate();
Create an asynchronous timer set on a specified interval. When the event is fired, the rx_handler will receive the event.