Struct dipstick::TimeHandle
source · pub struct TimeHandle(_);
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 more