Trait groundhog_stm32g031::RollingTimer[][src]

pub trait RollingTimer {
    type Tick: RollingSince + Promote + Div<Self::Tick>;

    pub const TICKS_PER_SECOND: Self::Tick;

    pub fn get_ticks(&self) -> Self::Tick;

    pub fn ticks_since(&self, rhs: Self::Tick) -> Self::Tick { ... }
pub fn seconds_since(&self, rhs: Self::Tick) -> Self::Tick { ... }
pub fn millis_since(&self, rhs: Self::Tick) -> Self::Tick { ... }
pub fn micros_since(&self, rhs: Self::Tick) -> Self::Tick { ... } }

Associated Types

type Tick: RollingSince + Promote + Div<Self::Tick>[src]

Loading content...

Associated Constants

pub const TICKS_PER_SECOND: Self::Tick[src]

Loading content...

Required methods

pub fn get_ticks(&self) -> Self::Tick[src]

Get the current tick

Loading content...

Provided methods

pub fn ticks_since(&self, rhs: Self::Tick) -> Self::Tick[src]

Get the number of ticks since the other measurement

Make sure the old value isn’t too stale.

pub fn seconds_since(&self, rhs: Self::Tick) -> Self::Tick[src]

Get the number of whole seconds since the other measurement

Make sure the old value isn’t too stale

pub fn millis_since(&self, rhs: Self::Tick) -> Self::Tick[src]

Get the number of whole milliseconds since the other measurement

Make sure the old value isn’t too stale

If the number of milliseconds is larger than Self::Tick::max(), then it will saturate at the max value

pub fn micros_since(&self, rhs: Self::Tick) -> Self::Tick[src]

Get the number of whole microseconds since the other measurement

Make sure the old value isn’t too stale

If the number of microseconds is larger than Self::Tick::max(), then it will saturate at the max value

Loading content...

Implementors

Loading content...