aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 09:43:47 +0100
committerAleksey Kladov <[email protected]>2020-07-30 09:43:47 +0100
commitf22af66c3763c4b2a9d16621473cb6979fb2f36d (patch)
tree4b35f683a6bfb70fa9e1db3b22371ebcde0e7d99 /crates/ra_prof
parent5e498546e8275c86e0b3f711b069b2787c6385f2 (diff)
Fixes
Diffstat (limited to 'crates/ra_prof')
-rw-r--r--crates/ra_prof/src/stop_watch.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/crates/ra_prof/src/stop_watch.rs b/crates/ra_prof/src/stop_watch.rs
index c52c92ce5..8b8ec25a5 100644
--- a/crates/ra_prof/src/stop_watch.rs
+++ b/crates/ra_prof/src/stop_watch.rs
@@ -1,3 +1,4 @@
1//! Like `std::time::Instant`, but also measures memory & CPU cycles.
1use std::{ 2use std::{
2 fmt, 3 fmt,
3 time::{Duration, Instant}, 4 time::{Duration, Instant},
@@ -76,14 +77,3 @@ impl fmt::Display for StopWatchSpan {
76 Ok(()) 77 Ok(())
77 } 78 }
78} 79}
79
80// Unclear if we need this:
81// https://github.com/jimblandy/perf-event/issues/8
82impl Drop for StopWatch {
83 fn drop(&mut self) {
84 #[cfg(target_os = "linux")]
85 if let Some(mut counter) = self.counter.take() {
86 let _ = counter.disable();
87 }
88 }
89}