Expand description

ztimer high level timer

ZTimer clocks are usually obtained by calling constructors that depend on the presence of global clocks – Clock::sec, Clock::msec and Clock::usec.

The methods usable on the clocks typically take durations in the form of Ticks, which ensure that time calculations are done early but can’t be mixed up between clocks. The sleep and spin methods take numeric tick counts and durations, not only for historical reasons, but also because sleeping for a Duration works infallibly (even if the duration exceeds the maximum number of ticks a timer can sleep) by sleeping in repetitions.



A clock that knows about its frequency. The pulse length is not given in core::time::Duration as that’s not even supported by non-min_ const_generics. This change, even though it breaks the API.

The error type of fallible conversions to ticks.

A duration on a clock of fixed speed

Type Definitions