bro was this bug here all along and i never noticed

This commit is contained in:
Drath Vader
2025-10-24 12:13:10 +02:00
parent 97ee843250
commit b24c01b159

View File

@@ -1,4 +1,5 @@
#include <cpu.hpp>
#include <print>
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);