From 7c25d83f1cc4c7db2d2d3f4506525dd056b885e8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 12:14:27 +0200 Subject: Tag: use SignedSongTime for the song duration --- src/SongPrint.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SongPrint.cxx') diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx index e5ebfaab2..0c1b93265 100644 --- a/src/SongPrint.cxx +++ b/src/SongPrint.cxx @@ -119,7 +119,7 @@ song_print_info(Client &client, const DetachedSong &song, bool base) tag_print_values(client, song.GetTag()); - double duration = song.GetDuration(); - if (duration >= 0) - client_printf(client, "Time: %u\n", unsigned(duration + 0.5)); + const auto duration = song.GetDuration(); + if (!duration.IsNegative()) + client_printf(client, "Time: %u\n", duration.RoundS()); } -- cgit v1.2.3