Add cpu usage for every core

This commit is contained in:
Darkclainer
2021-09-19 13:41:59 +03:00
parent cee08eccd1
commit 6e5a0bc80a
3 changed files with 55 additions and 18 deletions

View File

@ -19,11 +19,11 @@ class Cpu : public ALabel {
auto update() -> void;
private:
double getCpuLoad();
std::tuple<uint16_t, std::string> getCpuUsage();
std::tuple<float, float, float> getCpuFrequency();
std::vector<std::tuple<size_t, size_t>> parseCpuinfo();
std::vector<float> parseCpuFrequencies();
double getCpuLoad();
std::tuple<std::vector<uint16_t>, std::string> getCpuUsage();
std::tuple<float, float, float> getCpuFrequency();
std::vector<std::tuple<size_t, size_t>> parseCpuinfo();
std::vector<float> parseCpuFrequencies();
std::vector<std::tuple<size_t, size_t>> prev_times_;