diff options
Diffstat (limited to 'src/SongPrint.cxx')
-rw-r--r-- | src/SongPrint.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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()); } |