db/Stats: use std::chrono::duration for the total duration

Use milliseconds precision to reduce rounding errors.
This commit is contained in:
Max Kellermann
2014-08-29 23:22:46 +02:00
parent de64b35359
commit 58352ea69d
4 changed files with 11 additions and 6 deletions

View File

@@ -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) {