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§
fn frequency() -> Rate<u32, 1000, 1>
fn now() -> Self
Sourcefn tick_since(self, earlier: Self) -> u32
fn tick_since(self, earlier: Self) -> u32
Returns the amount of ticks elapsed from another instant to this one.
Provided Methods§
Sourcefn tick_elapsed(self) -> u32
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.