pub enum MillisecondResolution {}
Expand description
Millisecond resolution adapter.
Trait Implementations§
Source§impl Debug for MillisecondResolution
impl Debug for MillisecondResolution
Source§impl Resolution for MillisecondResolution
impl Resolution for MillisecondResolution
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) -> u64
fn whole_steps(duration: &Duration) -> u64
Return total steps required for the given duration.
The returned steps should not be rounded up.
Auto Trait Implementations§
impl Freeze for MillisecondResolution
impl RefUnwindSafe for MillisecondResolution
impl Send for MillisecondResolution
impl Sync for MillisecondResolution
impl Unpin for MillisecondResolution
impl UnwindSafe for MillisecondResolution
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