[−][src]Trait embedded_time::clock::Clock
The Clock
trait provides an abstraction for hardware-specific timer peripherals, external
timer devices, RTCs, etc.
The Clock
is characterized by an inner unsigned integer storage type (either u32
or
u64
), a u32
/u32
Fraction
defining the duration (in seconds) of one
count of the Clock
, and a custom error type representing errors that may be generated by the
implementation.
In addition to the Clock::try_now()
method which returns an Instant
,
software Timer
s can be spawned from a Clock
object.
Associated Types
Loading content...Associated Constants
const SCALING_FACTOR: Fraction
The duration of one clock tick in seconds, AKA the clock precision.
Required methods
Loading content...Provided methods
fn new_timer<Dur: Duration>(
&self,
duration: Dur
) -> Timer<OneShot, Armed, Self, Dur> where
Dur: FixedPoint,
&self,
duration: Dur
) -> Timer<OneShot, Armed, Self, Dur> where
Dur: FixedPoint,
Spawn a new, OneShot
Timer
from this clock