Skip to content

hal::tick

Hardware timer tick source trait.

The system tick drives preemptive scheduling, timeouts, and sleep. Each architecture provides its own implementation (e.g. Xtensa CCOUNT

  • CCOMPARE0 for ESP32).
trait TickSource {
fn init(period_us: u32, cpu_hz: u32)
fn tick() -> bool
fn now() -> u64
}

A tick source provides the periodic interrupt that drives the scheduler.