This library provides methods for getting the percentage of cpu time spent idle, a.k.a. cpu usage.
It follows the structure of std::time
, since you can only work with a difference between 2
fixed points in time. Cpu usage and a specific instant is either 0 or 1 (per core), the value of
interest is the proportion of cpu cycles spent not idle over a given period.
Examples
extern crate cpu_monitor;
use io;
use Duration;
use CpuInstant;