使用Open Hardware Monitor API启用Gpu数据检索时,出现严重的滞后现象并冻结:任何想法为何?
//Causes Severe Lag
//GPU Usage openhardwaremonitor
//---------------------------
Computer c = new Computer()
{
GPUEnabled = true
};
c.Open();
foreach (var hardware in c.Hardware)
{
if (hardware.HardwareType == HardwareType.GpuNvidia)
{
hardware.Update();
foreach (var sensor in hardware.Sensors)
if (sensor.SensorType == SensorType.Level)
label27.Text = sensor.Name + ": " +sensor.Value.GetValueOrDefault();
}
//
if (hardware.HardwareType == HardwareType.GpuAti)
{
hardware.Update();
foreach (var sensor in hardware.Sensors)
if (sensor.SensorType == SensorType.Level)
label27.Text = sensor.Name + ": " + sensor.Value.GetValueOrDefault();
}
}
//----------------------------