pub struct PowerEstimator { /* private fields */ }Expand description
Power consumption estimator
Implementations§
Source§impl PowerEstimator
impl PowerEstimator
Sourcepub fn set_current(&mut self, current_ma: u32)
pub fn set_current(&mut self, current_ma: u32)
Set current consumption in milliamps
Sourcepub const fn current_ma(&self) -> u32
pub const fn current_ma(&self) -> u32
Get current consumption in milliamps
Sourcepub fn battery_life_hours(&self, battery_mah: u32) -> f32
pub fn battery_life_hours(&self, battery_mah: u32) -> f32
Estimate battery life in hours
Sourcepub fn energy_per_op(&self, operation_time_us: u32) -> f32
pub fn energy_per_op(&self, operation_time_us: u32) -> f32
Estimate energy consumption in millijoules per operation
Auto Trait Implementations§
impl Freeze for PowerEstimator
impl RefUnwindSafe for PowerEstimator
impl Send for PowerEstimator
impl Sync for PowerEstimator
impl Unpin for PowerEstimator
impl UnsafeUnpin for PowerEstimator
impl UnwindSafe for PowerEstimator
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