pub enum SecondResolution {}
Expand description
Second resolution adapter.
Trait Implementations§
Source§impl Debug for SecondResolution
impl Debug for SecondResolution
Source§impl Resolution for SecondResolution
impl Resolution for SecondResolution
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 SecondResolution
impl RefUnwindSafe for SecondResolution
impl Send for SecondResolution
impl Sync for SecondResolution
impl Unpin for SecondResolution
impl UnwindSafe for SecondResolution
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