diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 23:22:46 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 23:25:03 +0200 |
commit | 58352ea69d3e40bd3c91eacc7bbd48f58d5f2c8a (patch) | |
tree | 98b0f981114a98177e7cb805cefa6c1c335dd6fd /src/db/plugins/ProxyDatabasePlugin.cxx | |
parent | de64b35359dff6f052aee4b38042c0d91ae5aefb (diff) | |
download | mpd-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/plugins/ProxyDatabasePlugin.cxx')
-rw-r--r-- | src/db/plugins/ProxyDatabasePlugin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx index 97b544203..8f9d12188 100644 --- a/src/db/plugins/ProxyDatabasePlugin.cxx +++ b/src/db/plugins/ProxyDatabasePlugin.cxx @@ -807,7 +807,7 @@ ProxyDatabase::GetStats(const DatabaseSelection &selection, update_stamp = (time_t)mpd_stats_get_db_update_time(stats2); stats.song_count = mpd_stats_get_number_of_songs(stats2); - stats.total_duration = mpd_stats_get_db_play_time(stats2); + stats.total_duration = std::chrono::seconds(mpd_stats_get_db_play_time(stats2)); stats.artist_count = mpd_stats_get_number_of_artists(stats2); stats.album_count = mpd_stats_get_number_of_albums(stats2); mpd_stats_free(stats2); |