get_sim_nanos
timer_init
timer_start() to start the timer, and define the chip_timer_event() callback to response to timer events.
The timer_config_t struct contains the following fields:
The signature for the callback function is as follows:
timer_start
timer_id. The micros argument determines how many microseconds will pass until the timer will call chip_timer_event(). If repeat is false, the timer event will be called once (one-shot timer). If repeat is true, the timer event will keep getting called every micros microseconds, until you call timer_stop() or reconfigure the timer with timer_start.
timer_start_ns
timer_start, but specifies the duration of the timer in nanoseconds instead of microseconds. Prefer timer_start() when possible, in order to improve performance.
timer_stop
timer_start() again.