(&mut self)
| 62 | /// Dropping a `Guard` will add its recorded elapsed time to the top of the current local scope stack |
| 63 | impl Drop for Guard { |
| 64 | fn drop(&mut self) { |
| 65 | let duration = self.enter_time.elapsed(); |
| 66 | PROFILER |
| 67 | .get() |
| 68 | .expect("Missing thread local profiler") |
| 69 | .write() |
| 70 | .leave(duration) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | #[derive(Clone, Debug)] |