From e26d26b49813257f195d97d5f3629838a9ac5efe Mon Sep 17 00:00:00 2001 From: seerge Date: Mon, 13 Mar 2023 23:28:58 +0100 Subject: [PATCH] - --- HardwareMonitor.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/HardwareMonitor.cs b/HardwareMonitor.cs index 6ce45fd5..82d453b2 100644 --- a/HardwareMonitor.cs +++ b/HardwareMonitor.cs @@ -19,8 +19,7 @@ public static class HardwareMonitor var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true); cpuTemp = ct.NextValue() - 273; ct.Dispose(); - } - catch + } catch { Logger.WriteLine("Failed reading CPU temp"); } @@ -31,8 +30,7 @@ public static class HardwareMonitor batteryDischarge = cb.NextValue() / 1000; cb.Dispose(); - } - catch + } catch { Logger.WriteLine("Failed reading Battery discharge"); }