Skip to main content

MonotonicTimer

Trait MonotonicTimer 

Source
pub trait MonotonicTimer {
    // Required methods
    fn now(&self) -> u64;
    fn set_alarm(&self, at: u64) -> bool;
}
Expand description

Minimal monotonic timer abstraction shared by chip HAL time drivers.

Required Methods§

Source

fn now(&self) -> u64

Return monotonically increasing ticks.

Source

fn set_alarm(&self, at: u64) -> bool

Program the next hardware alarm.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§