Use null for unknown hashrate in API.

This commit is contained in:
XMRig 2019-04-25 02:22:53 +07:00
parent 304d7bd09a
commit 378bc504fc

View file

@ -40,13 +40,15 @@
#include "workers/Workers.h"
static inline double normalize(double d)
static inline rapidjson::Value normalize(double d)
{
using namespace rapidjson;
if (!isnormal(d)) {
return 0.0;
return Value(kNullType);
}
return floor(d * 100.0) / 100.0;
return Value(floor(d * 100.0) / 100.0);
}