From 58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 23:22:46 +0200 Subject: db/Stats: use std::chrono::duration for the total duration Use milliseconds precision to reduce rounding errors. --- src/db/Helpers.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/db/Helpers.cxx') 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) { -- cgit v1.2.3