OpenHardwareMonitor.TryGetAverage<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to calculate the average of a set of sensors.
public bool TryGetAverage<T> (Iot.Device.HardwareMonitor.OpenHardwareMonitor.Hardware hardware, out T? average) where T : UnitsNet.IQuantity;
member this.TryGetAverage : Iot.Device.HardwareMonitor.OpenHardwareMonitor.Hardware * 'T -> bool (requires 'T :> UnitsNet.IQuantity)
Public Function TryGetAverage(Of T As IQuantity) (hardware As OpenHardwareMonitor.Hardware, ByRef average As T) As Boolean
Type Parameters
- T
Type of value to query (i.e. Load, Power)
Parameters
- hardware
- OpenHardwareMonitor.Hardware
The hardware type (i.e. CPU)
- average
- T
Gets the returned quantity
Returns
True if at least one matching quantity was found
Exceptions
There were multiple sensors found, but they return different units (i.e. CPU temperature is reported as Celsius for some cores and Fahrenheit for others)