rtic_time::monotonic

Trait TimerQueueBasedInstant

Source
pub trait TimerQueueBasedInstant: Ord + Copy {
    type Ticks;

    // Required methods
    fn from_ticks(ticks: Self::Ticks) -> Self;
    fn ticks(self) -> Self::Ticks;
}
Expand description

An instant that can be used in TimerQueueBasedMonotonic.

Required Associated Types§

Source

type Ticks

The internal type of the instant

Required Methods§

Source

fn from_ticks(ticks: Self::Ticks) -> Self

Convert from ticks to the instant

Source

fn ticks(self) -> Self::Ticks

Convert the instant to ticks

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<const NOM: u32, const DENOM: u32> TimerQueueBasedInstant for Instant<u32, NOM, DENOM>

Source§

type Ticks = u32

Source§

fn from_ticks(ticks: Self::Ticks) -> Self

Source§

fn ticks(self) -> Self::Ticks

Source§

impl<const NOM: u32, const DENOM: u32> TimerQueueBasedInstant for Instant<u64, NOM, DENOM>

Source§

type Ticks = u64

Source§

fn from_ticks(ticks: Self::Ticks) -> Self

Source§

fn ticks(self) -> Self::Ticks

Implementors§