Struct dipstick::TimeHandle
source · pub struct TimeHandle(/* private fields */);
Expand description
A handle to the start time of a counter. Wrapped so it may be changed safely later.
Implementations§
source§impl TimeHandle
impl TimeHandle
sourcepub fn now() -> TimeHandle
pub fn now() -> TimeHandle
Get a handle on current time. Used by the TimerMetric start_time() method.
sourcepub fn elapsed_us(self) -> u64
pub fn elapsed_us(self) -> u64
Get the elapsed time in microseconds since TimeHandle was obtained.
sourcepub fn elapsed_ms(self) -> MetricValue
pub fn elapsed_ms(self) -> MetricValue
Get the elapsed time in milliseconds since TimeHandle was obtained.
Trait Implementations§
source§impl Clone for TimeHandle
impl Clone for TimeHandle
source§fn clone(&self) -> TimeHandle
fn clone(&self) -> TimeHandle
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 TimeHandle
impl Debug for TimeHandle
source§impl Default for TimeHandle
impl Default for TimeHandle
impl Copy for TimeHandle
Auto Trait Implementations§
impl Freeze for TimeHandle
impl RefUnwindSafe for TimeHandle
impl Send for TimeHandle
impl Sync for TimeHandle
impl Unpin for TimeHandle
impl UnwindSafe for TimeHandle
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