heim_cpu/os/windows/stats.rs
1/// Windows-specific extension for [CpuStats].
2///
3/// [CpuStats]: ../../struct.CpuStats.html
4pub trait CpuStatsExt {
5 /// Returns number of [Deferred Procedure Calls] since boot.
6 ///
7 /// [Deferred Procedure Calls]: https://en.wikipedia.org/wiki/Deferred_Procedure_Call
8 fn dpc(&self) -> u64;
9
10 /// Returns number of syscalls since boot.
11 fn syscalls(&self) -> u64;
12}
13
14#[cfg(target_os = "windows")]
15impl CpuStatsExt for crate::CpuStats {
16 fn dpc(&self) -> u64 {
17 self.as_ref().dpc()
18 }
19
20 fn syscalls(&self) -> u64 {
21 self.as_ref().syscalls()
22 }
23}