aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Helpers.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-29 23:22:46 +0200
committerMax Kellermann <max@duempel.org>2014-08-29 23:25:03 +0200
commit58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a (patch)
tree98b0f981114a98177e7cb805cefa6c1c335dd6fd /src/db/Helpers.cxx
parentde64b35359dff6f052aee4b38042c0d91ae5aefb (diff)
downloadmpd-58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a.tar.gz
mpd-58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a.tar.xz
mpd-58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a.zip
db/Stats: use std::chrono::duration for the total duration
Use milliseconds precision to reduce rounding errors.
Diffstat (limited to 'src/db/Helpers.cxx')
-rw-r--r--src/db/Helpers.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/Helpers.cxx b/src/db/Helpers.cxx
index 8df6c265c..add4bb98e 100644
--- a/src/db/Helpers.cxx
+++ b/src/db/Helpers.cxx
@@ -41,7 +41,7 @@ StatsVisitTag(DatabaseStats &stats, StringSet &artists, StringSet &albums,
const Tag &tag)
{
if (!tag.duration.IsNegative())
- stats.total_duration += tag.duration.ToS();
+ stats.total_duration += tag.duration;
for (const auto &item : tag) {
switch (item.type) {