Enum ora_timer::resolution::Microseconds
source · pub enum Microseconds {}
Expand description
Microsecond resolution adapter.
Note that this kind of resolution is only possible in very specific setups, as even a context switch or allocation takes longer on Linux.
Trait Implementations§
source§impl Resolution for Microseconds
impl Resolution for Microseconds
source§const MAX_DURATION: Duration = _
const MAX_DURATION: Duration = _
The maximum duration that can be represented as
u32
at this resolution.source§fn cycle_steps(duration: &Duration, upper_bound: bool) -> u32
fn cycle_steps(duration: &Duration, upper_bound: bool) -> u32
Convert the given duration into timer cycle steps.
The given duration is guaranteed to be smaller than
Resolution::MAX_DURATION
. Read moresource§fn steps_as_duration(steps: u64) -> Duration
fn steps_as_duration(steps: u64) -> Duration
Convert the given steps to a duration.
source§fn whole_steps(duration: &Duration) -> u128
fn whole_steps(duration: &Duration) -> u128
Return total steps required for the given duration.
The returned steps should not be rounded up.
Auto Trait Implementations§
impl RefUnwindSafe for Microseconds
impl Send for Microseconds
impl Sync for Microseconds
impl Unpin for Microseconds
impl UnwindSafe for Microseconds
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more