return a scoped guard that adds the amount of time elapsed between its creation and its drop or call to `stop` to the underlying metric.
(&self)
| 212 | /// between its creation and its drop or call to `stop` to the |
| 213 | /// underlying metric. |
| 214 | pub fn timer(&self) -> ScopedTimerGuard<'_> { |
| 215 | ScopedTimerGuard { |
| 216 | inner: self, |
| 217 | start: Some(Instant::now()), |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /// Get the number of nanoseconds record by this Time metric |
| 222 | pub fn value(&self) -> usize { |
no outgoing calls
no test coverage detected