pub struct PerfCounterManager<'a> {
    start_time: Instant,
    counter: &'a mut PerfCounter,
}
Expand description

Context manager for a performance counter. This is used to track when the measured function exits.

Fields

start_time: Instant

Instant then the time measurement was started.

counter: &'a mut PerfCounter

Implementations

Stop measuring the time and add the duration to the total spent time.

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.