pub struct TimerOptions {
pub sleep_threshold: Duration,
pub bookkeeping_interval: Duration,
}
Expand description
Options for the timer loop.
Fields§
§sleep_threshold: Duration
The threshold to the next tick at which the timer loop will sleep to reduce CPU usage.
Set to Duration::ZERO
to always keep
the timer in a busy loop achieving
the lowest possible latency at the
cost of high CPU usage.
bookkeeping_interval: Duration
The rate at which bookkeeping is run while the timer loop is idle or waiting for the next tick.
Trait Implementations§
Source§impl Clone for TimerOptions
impl Clone for TimerOptions
Source§fn clone(&self) -> TimerOptions
fn clone(&self) -> TimerOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TimerOptions
impl Debug for TimerOptions
Source§impl Default for TimerOptions
impl Default for TimerOptions
impl Copy for TimerOptions
Auto Trait Implementations§
impl Freeze for TimerOptions
impl RefUnwindSafe for TimerOptions
impl Send for TimerOptions
impl Sync for TimerOptions
impl Unpin for TimerOptions
impl UnwindSafe for TimerOptions
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