summaryrefslogtreecommitdiff
path: root/src/Stats.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r--src/Stats.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx
index 0ba5d6b85..d62025c82 100644
--- a/src/Stats.cxx
+++ b/src/Stats.cxx
@@ -31,6 +31,7 @@
#include "util/ChronoUtil.hxx"
#include <chrono>
+#include <cmath>
#ifndef _WIN32
/**
@@ -120,7 +121,7 @@ stats_print(Response &r, const Partition &partition)
#else
(unsigned)std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - start_time).count(),
#endif
- (unsigned long)(partition.pc.GetTotalPlayTime().count() + 0.5));
+ std::lround(partition.pc.GetTotalPlayTime().count()));
#ifdef ENABLE_DATABASE
const Database *db = partition.instance.database;