TickInstant

Trait TickInstant 

Source
pub trait TickInstant: Copy {
    // Required methods
    fn frequency() -> Rate<u32, 1000, 1>;
    fn now() -> Self;
    fn tick_since(self, earlier: Self) -> u32;

    // Provided method
    fn tick_elapsed(self) -> u32 { ... }
}

Required Methods§

Source

fn frequency() -> Rate<u32, 1000, 1>

Source

fn now() -> Self

Source

fn tick_since(self, earlier: Self) -> u32

Returns the amount of ticks elapsed from another instant to this one.

Provided Methods§

Source

fn tick_elapsed(self) -> u32

Returns the amount of ticks elapsed since this instant.

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.

Implementors§