mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
cpu module: Reuse getCpuFrequency of cpu_frequency module
This commit is contained in:
@ -23,9 +23,7 @@ class Cpu : public ALabel {
|
||||
private:
|
||||
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_;
|
||||
|
||||
|
@ -20,9 +20,11 @@ class CpuFrequency : public ALabel {
|
||||
virtual ~CpuFrequency() = default;
|
||||
auto update() -> void override;
|
||||
|
||||
// This is a static member because it is also used by the cpu module.
|
||||
static std::tuple<float, float, float> getCpuFrequency();
|
||||
|
||||
private:
|
||||
std::tuple<float, float, float> getCpuFrequency();
|
||||
std::vector<float> parseCpuFrequencies();
|
||||
static std::vector<float> parseCpuFrequencies();
|
||||
|
||||
util::SleeperThread thread_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user