Trait energy_monitor::EnergyMonitor [] [src]

pub trait EnergyMonitor {
    fn read_uj(&self) -> Result<u64, &'static str>;
fn source(&self) -> String;
fn interval_us(&self) -> u64;
fn precision_uj(&self) -> u64;
fn is_exclusive(&self) -> bool; }

An energy monitor typically reads from an internal or external sensor. It could also estimate energy consumption using hardware counters or other heuristics.

Required Methods

Read the energy value in microjoules

Get the energy monitoring source as a String

Get the energy monitor's refresh interval in microseconds. This can be used as a minimum polling period.

Get the energy monitor's precision in microjoules.

Get whether energy monitor requires exclusive access.

Implementors