OpenHardwareMonitor.StartMonitoring 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.
Starts monitoring a sensor. This will internally start a thread that calls the provided action each time the TimeSpan elapses.
public Iot.Device.HardwareMonitor.OpenHardwareMonitor.MonitoringJob StartMonitoring (Iot.Device.HardwareMonitor.OpenHardwareMonitor.Sensor sensorToMonitor, TimeSpan monitoringInterval, Iot.Device.HardwareMonitor.OpenHardwareMonitor.OnNewValue onNewValue);
member this.StartMonitoring : Iot.Device.HardwareMonitor.OpenHardwareMonitor.Sensor * TimeSpan * Iot.Device.HardwareMonitor.OpenHardwareMonitor.OnNewValue -> Iot.Device.HardwareMonitor.OpenHardwareMonitor.MonitoringJob
Public Function StartMonitoring (sensorToMonitor As OpenHardwareMonitor.Sensor, monitoringInterval As TimeSpan, onNewValue As OpenHardwareMonitor.OnNewValue) As OpenHardwareMonitor.MonitoringJob
Parameters
- sensorToMonitor
- OpenHardwareMonitor.Sensor
The sensor to monitor. The same sensor may be registered multiple times
- monitoringInterval
- TimeSpan
The monitoring interval. Will be rounded to the next 0.1s.
- onNewValue
- OpenHardwareMonitor.OnNewValue
Action to perform each time
Returns
An identifier for the monitoring job