[−][src]Trait topq::Timer
A trait that represents a (probably rolling) timer of arbitrary precision.
Associated Types
Loading content...Associated Constants
const TICKS_PER_SECOND: u32
The number of ticks per second. e.g. if using a 32.786kHz
timer, this would be 32_768
Required methods
fn now(&self) -> Self::Time
Get the current time
fn wrapping_add(time: &Self::Time, offset: &Self::Time) -> Self::Time
Add a timestamp plus an offset. When this type is expected to
be rolling (e.g. when using a u32
with a 32.768kHz clock), the
addition should be done by wrapping