Trait emulator_hal::Instant

source ·
pub trait Instant: Add<Self::Duration, Output = Self> + Eq + Ord + Debug + Copy {
    type Duration: Mul<u32, Output = Self::Duration> + Debug;

    const START: Self;

    // Required method
    fn hertz_to_duration(hertz: u64) -> Self::Duration;
}
Expand description

Represents a monotonic instant in time

Required Associated Types§

source

type Duration: Mul<u32, Output = Self::Duration> + Debug

Represents a duration that can be added to an instant of this type

Required Associated Constants§

source

const START: Self

The start of the epoch according to this time representation

Required Methods§

source

fn hertz_to_duration(hertz: u64) -> Self::Duration

Returns the duration of one period of the given frequency is hertz

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Instant for Instant

source§

const START: Self = femtos::Instant::START

§

type Duration = Duration

source§

fn hertz_to_duration(hertz: u64) -> Self::Duration

source§

impl Instant for Duration

source§

const START: Self = _

§

type Duration = Duration

source§

fn hertz_to_duration(hertz: u64) -> Self::Duration

Implementors§