diff options
author | Arnavion <arnavion@gmail.com> | 2019-08-10 17:17:45 -0700 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2019-08-10 17:17:45 -0700 |
commit | 909bb86f05c20f0ec6f5d55994065a293932ce21 (patch) | |
tree | a74598e116cbbdb0c5da973734affe596bd9d777 /darwin/Platform.c | |
parent | 43728b37e76e4ed32b04c133ca55e27116cdfa06 (diff) |
Show N/A on unsupported platforms instead of 0KHz
Diffstat (limited to 'darwin/Platform.c')
-rw-r--r-- | darwin/Platform.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/darwin/Platform.c b/darwin/Platform.c index 1dce8b67..cd45bedf 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -217,6 +217,8 @@ double Platform_setCPUValues(Meter* mtr, int cpu) { /* Convert to percent and return */ total = mtr->values[CPU_METER_NICE] + mtr->values[CPU_METER_NORMAL] + mtr->values[CPU_METER_KERNEL]; + mtr->values[CPU_METER_FREQUENCY] = -1; + return CLAMP(total, 0.0, 100.0); } |