parent
ef19480eda
commit
b513dcd352
@ -630,13 +630,13 @@ Json JsonReader::ParseNumber() {
|
|||||||
// multiply zero by inf which gives nan.
|
// multiply zero by inf which gives nan.
|
||||||
if (f != 0.0) {
|
if (f != 0.0) {
|
||||||
// Only use exp10 from libc on gcc+linux
|
// Only use exp10 from libc on gcc+linux
|
||||||
#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__)
|
#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) || !defined(__linux__)
|
||||||
#define exp10(val) std::pow(10, (val))
|
#define exp10(val) std::pow(10, (val))
|
||||||
#endif // !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__)
|
#endif // !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) || !defined(__linux__)
|
||||||
f *= exp10(exponent);
|
f *= exp10(exponent);
|
||||||
#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__)
|
#if !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) || !defined(__linux__)
|
||||||
#undef exp10
|
#undef exp10
|
||||||
#endif // !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__)
|
#endif // !defined(__GNUC__) || defined(_WIN32) || defined(__APPLE__) || !defined(__linux__)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,8 +44,9 @@ std::vector<Monitor::StatMap> Monitor::CollectFromOtherRanks() const {
|
|||||||
statistic[kv.first] = Object();
|
statistic[kv.first] = Object();
|
||||||
auto& j_pair = statistic[kv.first];
|
auto& j_pair = statistic[kv.first];
|
||||||
j_pair["count"] = Integer(kv.second.count);
|
j_pair["count"] = Integer(kv.second.count);
|
||||||
j_pair["elapsed"] = Integer(std::chrono::duration_cast<std::chrono::microseconds>(
|
j_pair["elapsed"] = Integer(static_cast<int64_t>(
|
||||||
kv.second.timer.elapsed).count());
|
std::chrono::duration_cast<std::chrono::microseconds>(
|
||||||
|
kv.second.timer.elapsed).count()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user