pub struct TimerState { /* private fields */ }
Expand description
Structure used to keep track of the current process time since the last start_timer!()
call,
as well as the sum of all previously calculated times.
Implementations§
Source§impl TimerState
impl TimerState
pub fn new() -> Self
Sourcepub fn add_time(&mut self, up_to: ProcessTime)
pub fn add_time(&mut self, up_to: ProcessTime)
Helper function to add time up to a certain ProcessTime
Sourcepub fn reset_time(&mut self, new_time: ProcessTime)
pub fn reset_time(&mut self, new_time: ProcessTime)
Setter function to reset time to the given ProcessTime
pub fn get_total_elapsed(&self) -> Duration
Trait Implementations§
Source§impl Clone for TimerState
impl Clone for TimerState
Source§fn clone(&self) -> TimerState
fn clone(&self) -> TimerState
Returns a duplicate 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 TimerState
impl Debug for TimerState
Source§impl PartialEq for TimerState
impl PartialEq for TimerState
impl Eq for TimerState
impl StructuralPartialEq for TimerState
Auto Trait Implementations§
impl Freeze for TimerState
impl RefUnwindSafe for TimerState
impl Send for TimerState
impl Sync for TimerState
impl Unpin for TimerState
impl UnwindSafe for TimerState
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