From 3c65d78d77e43de12284417012fad2d8c195770e Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 7 Sep 2020 12:24:32 +0200 Subject: Update CPU freq display to use NAN on error --- darwin/Platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'darwin') diff --git a/darwin/Platform.c b/darwin/Platform.c index 1186fe04..129b1cb9 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -19,6 +19,7 @@ in the source distribution for its full text. #include "zfs/ZfsCompressedArcMeter.h" #include "DarwinProcessList.h" +#include #include @@ -210,7 +211,7 @@ 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; + mtr->values[CPU_METER_FREQUENCY] = NAN; return CLAMP(total, 0.0, 100.0); } -- cgit v1.2.3