{Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision

This commit is contained in:
Max Kellermann
2014-11-25 17:46:43 +01:00
parent 83fd822e8b
commit 70b5a81a29
5 changed files with 22 additions and 4 deletions

View File

@@ -23,8 +23,6 @@
#include "tag/TagSettings.h"
#include "client/Client.hxx"
#define SONG_TIME "Time: "
void tag_print_types(Client &client)
{
int i;
@@ -53,7 +51,10 @@ tag_print_values(Client &client, const Tag &tag)
void tag_print(Client &client, const Tag &tag)
{
if (!tag.duration.IsNegative())
client_printf(client, SONG_TIME "%i\n", tag.duration.RoundS());
client_printf(client, "Time: %i\n"
"duration: %1.3f\n",
tag.duration.RoundS(),
tag.duration.ToDoubleS());
tag_print_values(client, tag);
}