Struct mprober_lib::cpu::CPUTime
source · [−]Fields
non_idle: u64idle: u64Implementations
sourceimpl CPUTime
impl CPUTime
sourcepub fn get_total_time(self) -> u64
pub fn get_total_time(self) -> u64
Get the total CPU time.
extern crate mprober_lib;
use mprober_lib::cpu;
let average_cpu_stat = cpu::get_average_cpu_stat().unwrap();
let cpu_time = average_cpu_stat.compute_cpu_time();
let total_cpu_time = cpu_time.get_total_time();
println!("{}", total_cpu_time);Trait Implementations
impl Copy for CPUTime
Auto Trait Implementations
impl RefUnwindSafe for CPUTime
impl Send for CPUTime
impl Sync for CPUTime
impl Unpin for CPUTime
impl UnwindSafe for CPUTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more