From b24c01b1590749e5034da366291e3ae43c808216 Mon Sep 17 00:00:00 2001 From: Drath Vader Date: Fri, 24 Oct 2025 12:13:10 +0200 Subject: [PATCH] bro was this bug here all along and i never noticed --- src/cpu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu.cpp b/src/cpu.cpp index 70b7e79..8052fdf 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -1,4 +1,5 @@ #include +#include namespace cpu { @@ -43,6 +44,7 @@ void update(cpuSensors* c) { // lots of reads but still faster than reading /proc/cpuinfo char buf[5]; + c->avg_freq = 0; for (uint8_t i = 0; i < N_CPU; i++) { readFile2("/sys/devices/system/cpu/cpu" + std::to_string(i) + "/cpufreq/cpuinfo_avg_freq", buf, sizeof(buf)); c->avg_freq += strtol(buf, NULL, 10);