Crate cpu_time[][src]

CPU Time Measurement Library

Documentation | Github | Crate

Example


use std::time::Duration;
use cpu_time::ProcessTime;

let start = ProcessTime::now();
// .. do something ..
let cpu_time: Duration = start.elapsed();
println!(" {:?}", cpu_time);

Structs

ProcessTime

CPU Time Used by The Whole Process

ThreadTime

CPU Time Used by The Current Thread