diff options
author | Max Kellermann <max@musicpd.org> | 2018-09-22 19:08:03 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-09-22 19:08:03 +0200 |
commit | 863722545f1d892ce4d30b91f6bf25bb08b48a19 (patch) | |
tree | 7506cbab436c3819172acf5e553e2f1582d1b676 /src/Stats.cxx | |
parent | d3d1d37782952e9b1142a4735635aac3dd2db466 (diff) |
player/CrossFade, ...: use lround()
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 3 |
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; |