public void CpuTest1() { for (int i = 0; i < 100; i++) { Console.WriteLine($"温度:{CpuPackage.GetTemperature().ToString("f1")} ℃"); Console.WriteLine($"PerformanceCounter CpuUsage {Cpu.Instance.GetCurrentCpuUsage().ToString("f1")} %"); System.Threading.Thread.Sleep(10); } }
public void Test4() { for (int i = 0; i < 100; i++) { // 每次需要100毫秒 CpuPackage.GetTemperature(); } }
public void Test3() { // 第一次请求约需要160毫秒 CpuPackage.GetTemperature(); }