cfg linux imports (#8829)

This commit is contained in:
Luis Cossío
2026-04-28 16:00:35 -04:00
committed by timvisee
parent a18a09f5d0
commit eeb05f3f4e

View File

@@ -9,8 +9,11 @@
//! Currently only Linux is supported (via `/proc/self/stat`); other
//! platforms return `None`.
use std::time::{Duration, Instant};
use std::time::Duration;
#[cfg(target_os = "linux")]
use std::time::Instant;
#[cfg(target_os = "linux")]
use parking_lot::Mutex;
/// Sampling window: how often we query the OS for process CPU time.