pub trait TimerQueueTicks:
Copy
+ PartialEq
+ Eq {
const ONE_TICK: Self;
// Required methods
fn compare(self, other: Self) -> Ordering;
fn wrapping_add(self, other: Self) -> Self;
// Provided method
fn is_at_least(self, other: Self) -> bool { ... }
}
Expand description
The ticks of a timer.
Required Associated Constants§
Required Methods§
sourcefn compare(self, other: Self) -> Ordering
fn compare(self, other: Self) -> Ordering
Compares to another tick count.
Takes into account timer wrapping; if the difference is more than half the value range, the result will be flipped.
sourcefn wrapping_add(self, other: Self) -> Self
fn wrapping_add(self, other: Self) -> Self
Wrapping addition.
Provided Methods§
sourcefn is_at_least(self, other: Self) -> bool
fn is_at_least(self, other: Self) -> bool
True if self
is at the same time as other
or later.
Takes into account timer wrapping; if the difference is more than half the value range, the result will be negated.
Object Safety§
This trait is not object safe.