heim_cpu/os/linux/stats.rs
1/// Linux-specific extension for [CpuStats].
2///
3/// [CpuStats]: ../../struct.CpuStats.html
4pub trait CpuStatsExt {
5 /// Returns number of software interrupts since boot.
6 fn soft_interrupts(&self) -> u64;
7}
8
9#[cfg(target_os = "linux")]
10impl CpuStatsExt for crate::CpuStats {
11 fn soft_interrupts(&self) -> u64 {
12 self.as_ref().soft_interrupts()
13 }
14}