mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 17:00:18 +00:00
28 lines
586 B
Rust
28 lines
586 B
Rust
use crate::util::units::Second;
|
|
|
|
pub mod wallclocktimer;
|
|
|
|
#[cfg(windows)]
|
|
pub mod windows_timer;
|
|
|
|
#[cfg(not(windows))]
|
|
pub mod unix_timer;
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct CPUTimes {
|
|
/// Total amount of time spent executing in user mode
|
|
pub user_usec: i64,
|
|
|
|
/// Total amount of time spent executing in kernel mode
|
|
pub system_usec: i64,
|
|
}
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct CPUInterval {
|
|
/// Total amount of time spent executing in user mode
|
|
pub user: Second,
|
|
|
|
/// Total amount of time spent executing in kernel mode
|
|
pub system: Second,
|
|
}
|