cpu: port parseCpuinfo to BSDs

This commit is contained in:
Jan Beich
2019-08-11 13:10:37 +00:00
parent c4f7cdeec4
commit 4e567d0483
7 changed files with 136 additions and 30 deletions

View File

@ -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();