Trait sysinfo::ProcessorExt
source · pub trait ProcessorExt {
fn get_cpu_usage(&self) -> f32;
fn get_name(&self) -> &str;
}
Expand description
Contains all the methods of the Processor
struct.
Required Methods§
sourcefn get_cpu_usage(&self) -> f32
fn get_cpu_usage(&self) -> f32
Returns this processor’s usage.
Note: You’ll need to refresh it at least twice at first if you want to have a non-zero value.