pub struct CpuUsageSensor { /* private fields */ }Expand description
Sensor that reads CPU usage percentage from /proc/stat.
Computes the percentage by comparing idle vs. total time slices between consecutive reads. The first read returns 0% (no baseline yet). Returns a value in [0.0, 100.0] representing the aggregate CPU usage.
Implementations§
Trait Implementations§
Source§impl Debug for CpuUsageSensor
impl Debug for CpuUsageSensor
Source§impl Default for CpuUsageSensor
impl Default for CpuUsageSensor
Source§impl SensorDevice for CpuUsageSensor
impl SensorDevice for CpuUsageSensor
Auto Trait Implementations§
impl Freeze for CpuUsageSensor
impl RefUnwindSafe for CpuUsageSensor
impl Send for CpuUsageSensor
impl Sync for CpuUsageSensor
impl Unpin for CpuUsageSensor
impl UnsafeUnpin for CpuUsageSensor
impl UnwindSafe for CpuUsageSensor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more