Files
hyperfine/src/timer/mod.rs
T

27 lines
586 B
Rust
Raw Normal View History

2022-02-06 20:01:41 +01:00
use crate::util::units::Second;
2021-08-24 21:48:10 +02:00
2018-02-02 17:28:52 +01:00
pub mod wallclocktimer;
2018-02-05 18:22:59 -05:00
2021-08-24 21:36:37 +02:00
#[cfg(windows)]
2022-02-22 10:29:58 +01:00
pub mod windows_timer;
2019-05-07 11:55:38 +02:00
2021-08-24 21:36:37 +02:00
#[cfg(not(windows))]
2022-02-22 10:29:58 +01:00
pub mod unix_timer;
2021-08-24 21:48:10 +02:00
#[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,
}