Fixes
This commit is contained in:
parent
5e498546e8
commit
f22af66c37
@ -1,3 +1,4 @@
|
||||
//! Like `std::time::Instant`, but also measures memory & CPU cycles.
|
||||
use std::{
|
||||
fmt,
|
||||
time::{Duration, Instant},
|
||||
@ -76,14 +77,3 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
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 New Issue
Block a user