Files
linuxSmartie/include/cpu.hpp
2025-10-24 12:13:44 +02:00

36 lines
579 B
C++

#ifndef CPU_HPP
#define CPU_HPP
#include <chrono>
#include <cstdint>
#include <filesystem>
#include <log.hpp>
#include <string>
#include <utils.hpp>
#define N_CPU 16
namespace cpu {
struct cpuSensors {
std::string hwmon = "";
bool zenpower = false;
int tdie = 0;
int tctl = 0;
int tccd1 = 0;
double pcore = 0.0;
double psoc = 0.0;
double ptotal = 0.0;
double vcore = 0.0;
double vsoc = 0.0;
uint32_t avg_freq = 0;
};
void detectHwmon(cpuSensors* target, std::string pci);
void update(cpuSensors* g);
} // namespace cpu
#endif