mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Fixes
This commit is contained in:
parent
5e498546e8
commit
f22af66c37
1 changed files with 1 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
//! Like `std::time::Instant`, but also measures memory & CPU cycles.
|
||||||
use std::{
|
use std::{
|
||||||
fmt,
|
fmt,
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
|
@ -76,14 +77,3 @@ impl fmt::Display for StopWatchSpan {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unclear if we need this:
|
|
||||||
// https://github.com/jimblandy/perf-event/issues/8
|
|
||||||
impl Drop for StopWatch {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
if let Some(mut counter) = self.counter.take() {
|
|
||||||
let _ = counter.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue