1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

SystemMonitor: Parse /proc/cpuinfo as JSON

This commit is contained in:
Linus Groh 2020-07-11 21:08:40 +01:00 committed by Andreas Kling
parent fc0ec60d82
commit 858f6dc1d1
2 changed files with 12 additions and 39 deletions

View file

@ -89,14 +89,12 @@ public:
virtual GUI::Variant data(const GUI::ModelIndex&, Role = Role::Display) const override;
virtual void update() override;
struct CpuInfo
{
struct CpuInfo {
u32 id;
float total_cpu_percent{0.0};
HashMap<String, String> values;
CpuInfo(u32 id):
id(id)
float total_cpu_percent { 0.0 };
CpuInfo(u32 id)
: id(id)
{
}
};