Skip to content

Commit

Permalink
Add get_power_input (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Umio-Yasuno authored Oct 23, 2023
1 parent e3c5fef commit 065535d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hw_mon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ impl HwMon {
self.read_power("power1_average")
}

/// Gets the instantaneous power (currently) used by the GPU in watts.
pub fn get_power_input(&self) -> Result<f64> {
self.read_power("power1_input")
}

/// Gets the current power cap of the GPU in watts.
pub fn get_power_cap(&self) -> Result<f64> {
self.read_power("power1_cap")
Expand Down

0 comments on commit 065535d

Please sign in to comment.