aboutsummaryrefslogtreecommitdiffstats
path: root/src/TagPrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-25 17:46:43 +0100
committerMax Kellermann <max@duempel.org>2014-11-25 17:46:43 +0100
commit70b5a81a290e5f483e93c59413d5bd29d2047063 (patch)
tree934934174959613ad3cb5f04a3ecacde3c29319c /src/TagPrint.cxx
parent83fd822e8b9a4dd1132a2cec324c4171d8ca2946 (diff)
downloadmpd-70b5a81a290e5f483e93c59413d5bd29d2047063.tar.gz
mpd-70b5a81a290e5f483e93c59413d5bd29d2047063.tar.xz
mpd-70b5a81a290e5f483e93c59413d5bd29d2047063.zip
{Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision
Diffstat (limited to '')
-rw-r--r--src/TagPrint.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/TagPrint.cxx b/src/TagPrint.cxx
index 4937fa622..51ee80d83 100644
--- a/src/TagPrint.cxx
+++ b/src/TagPrint.cxx
@@ -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);
}