From 2f98b6686cf7fb4948b54cd334f9d8d3adc9f51f Mon Sep 17 00:00:00 2001 From: Drath Date: Tue, 28 Oct 2025 19:57:38 +0100 Subject: [PATCH] clearigy what im actually measuring --- src/cpu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpu.cpp b/src/cpu.cpp index 69600eb..09e2c59 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -35,6 +35,7 @@ void update(cpuSensors* c) { c->tctl = std::stoi(readFile(c->hwmon + "/temp1_input", 2)); c->tccd1 = std::stoi(readFile(c->hwmon + "/temp3_input", 2)); // read power from intel-rapl? works on amd too, btop uses this trick, seems accurate + // it tracks with "socket power" in hwinfo on windows, its actually the same thing i had in lcdsmartie auto current_ts = std::chrono::steady_clock::now(); auto current_usage = std::stoul(readFile("/sys/class/powercap/intel-rapl:0/energy_uj", 24)); c->ptotal = (float)(current_usage - previous_usage) / (float)(std::chrono::duration_cast(current_ts - previous_ts).count());