Enum ora_timer::resolution::Seconds
source · pub enum Seconds {}
Expand description
Second resolution adapter.
Use this if the use-case involves delays often exceeding 2^32
milliseconds (approx. 50 days) and you don’t need millisecond granularity.
Trait Implementations§
source§impl Resolution for Seconds
impl Resolution for Seconds
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 Seconds
impl Send for Seconds
impl Sync for Seconds
impl Unpin for Seconds
impl UnwindSafe for Seconds
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