diff options
author | wm4 <wm4@nowhere> | 2020-09-18 14:26:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-09-18 14:26:41 +0200 |
commit | fb3facf05268b43dbdf31994cb8a7ee192883874 (patch) | |
tree | 6a3a681e996914874b219e37cd04b30e08074a7b | |
parent | f4c39c74d4da11fc50fbb19210b5c0f3bfd7d332 (diff) | |
download | mpv-fb3facf05268b43dbdf31994cb8a7ee192883874.tar.bz2 mpv-fb3facf05268b43dbdf31994cb8a7ee192883874.tar.xz |
msg: make --msg-time show time in seconds
More readable, similar to what --log-file will use (although the
terminal code shows microseconds and uses less left padding).
-rw-r--r-- | DOCS/man/options.rst | 2 | ||||
-rw-r--r-- | common/msg.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index b2e41bca76..ed0b38c719 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4493,7 +4493,7 @@ Terminal ``--msg-time`` Prepend timing information to each console message. The time is in - microseconds since the player process was started (technically, slightly + seconds since the player process was started (technically, slightly later actually), using a monotonic time source depending on the OS. This is ``CLOCK_MONOTONIC`` on sane UNIX variants. diff --git a/common/msg.c b/common/msg.c index 7f8754b308..7e271d1b8b 100644 --- a/common/msg.c +++ b/common/msg.c @@ -306,7 +306,7 @@ static void print_terminal_line(struct mp_log *log, int lev, set_msg_color(stream, lev); if (root->show_time) - fprintf(stream, "[%" PRId64 "] ", mp_time_us() - MP_START_TIME); + fprintf(stream, "[%10.6f] ", (mp_time_us() - MP_START_TIME) / 1e6); const char *prefix = log->prefix; if ((lev >= MSGL_V) || root->verbose || root->module) |