[][src]Trait embedded_time::Clock

pub trait Clock: Sized {
    type Rep: TimeInt;

    const PERIOD: Period;

    fn now() -> Instant<Self>;

    fn delay<Dur>(dur: Dur)
    where
        Dur: Duration,
        Dur::Rep: TimeInt,
        Self::Rep: TryFrom<Dur::Rep>
, { ... } }

An abstraction for time-keeping items such as hardware timers

Associated Types

type Rep: TimeInt

The type to hold the tick count

Loading content...

Associated Constants

const PERIOD: Period

The duration of one clock tick in seconds, AKA the clock precision.

Loading content...

Required methods

fn now() -> Instant<Self>

Get the current Instant

Loading content...

Provided methods

fn delay<Dur>(dur: Dur) where
    Dur: Duration,
    Dur::Rep: TimeInt,
    Self::Rep: TryFrom<Dur::Rep>, 

Blocking delay

Loading content...

Implementors

Loading content...