pub struct Timer { /* private fields */ }Expand description
Helper for timing operations
Implementations§
Source§impl Timer
impl Timer
pub fn new() -> Self
pub fn observe_duration(&self, histogram: &Histogram)
pub fn observe_duration_with_labels( &self, histogram: &HistogramVec, labels: &[&str], )
pub fn elapsed_secs(&self) -> f64
Auto Trait Implementations§
impl Freeze for Timer
impl RefUnwindSafe for Timer
impl Send for Timer
impl Sync for Timer
impl Unpin for Timer
impl UnsafeUnpin for Timer
impl UnwindSafe for Timer
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