pub struct HistogramTimer { /* private fields */ }
Expand description

Timer to measure and record the duration of an event.

This timer can be stopped and observed at most once, either automatically (when it goes out of scope) or manually. Alternatively, it can be manually stopped and discarded in order to not record its value.

Implementations

Observe and record timer duration (in seconds).

It observes the floating-point number of seconds elapsed since the timer started, and it records that value to the attached histogram.

Observe, record and return timer duration (in seconds).

It observes and returns a floating-point number for seconds elapsed since the timer started, recording that value to the attached histogram.

Observe and return timer duration (in seconds).

It returns a floating-point number of seconds elapsed since the timer started, without recording to any histogram.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.