Enum ora_timer::resolution::Milliseconds
source · pub enum Milliseconds {}Expand description
Millisecond resolution adapter.
The default resolution for ora
that can be achieved most of the time.
Trait Implementations§
source§impl Resolution for Milliseconds
impl Resolution for Milliseconds
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 Freeze for Milliseconds
impl RefUnwindSafe for Milliseconds
impl Send for Milliseconds
impl Sync for Milliseconds
impl Unpin for Milliseconds
impl UnwindSafe for Milliseconds
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