mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
cpu: port parseCpuinfo to BSDs
This commit is contained in:
@ -10,7 +10,9 @@
|
||||
#if defined(__linux__) && !defined(NO_FILESYSTEM)
|
||||
#include "modules/battery.hpp"
|
||||
#endif
|
||||
#if defined(HAVE_CPU_LINUX) || defined(HAVE_CPU_BSD)
|
||||
#include "modules/cpu.hpp"
|
||||
#endif
|
||||
#include "modules/idle_inhibitor.hpp"
|
||||
#if defined(HAVE_MEMORY_LINUX) || defined(HAVE_MEMORY_BSD)
|
||||
#include "modules/memory.hpp"
|
||||
|
@ -20,7 +20,6 @@ class Cpu : public ALabel {
|
||||
auto update() -> void;
|
||||
|
||||
private:
|
||||
static inline const std::string data_dir_ = "/proc/stat";
|
||||
uint16_t getCpuLoad();
|
||||
std::tuple<uint16_t, std::string> getCpuUsage();
|
||||
std::vector<std::tuple<size_t, size_t>> parseCpuinfo();
|
||||
|
Reference in New Issue
Block a user