Trait Time

Source
pub trait Time {
    type Frequency: Frequency;
    type Ticks: Ticks;

    // Required method
    fn now(&self) -> Self::Ticks;
}
Expand description

Represents a moment in time, obtained by calling now.

Required Associated Types§

Source

type Frequency: Frequency

The number of ticks per second

Source

type Ticks: Ticks

The width of a time value

Required Methods§

Source

fn now(&self) -> Self::Ticks

Returns a timestamp. Depending on the implementation of Time, this could represent either a static timestamp or a sample of a counter; if an implementation relies on it being constant or changing it should use Timestamp or Counter.

Implementors§

impl Time for STimer<'_>

impl<'a, A: Alarm<'a>> Time for VirtualMuxAlarm<'a, A>

impl<'a, A: Alarm<'a>> Time for VirtualTimer<'a, A>

impl<CFG: EarlGreyConfig> Time for RvTimer<'_, CFG>

impl<F: Frequency, const C3: bool> Time for TimG<'_, F, C3>

impl<F: Frequency> Time for Gpt<'_, F>

impl<'t, R: LiteXSoCRegisterConfiguration, F: Frequency> Time for LiteXAlarm<'t, '_, R, F>

impl Time for TimerA<'_>

impl Time for Rtc<'_>

impl Time for TimerAlarm<'_>

impl Time for Tcpwm0<'_>

impl Time for RPTimer<'_>

impl Time for Ast<'_>

impl<F: Frequency> Time for Clint<'_, F>

impl Time for Tim2<'_>

impl Time for Tim2<'_>