aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof
diff options
context:
space:
mode:
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}