diff options
author | wm4 <wm4@nowhere> | 2020-02-14 16:12:37 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-14 16:12:37 +0100 |
commit | 641d102101087a3453398800febce2f65f104203 (patch) | |
tree | ecd59470a7cafd7675976e17ae5dad6313e56d4b | |
parent | 5793cb40c83f6b56d33e539c5375d27977921f36 (diff) | |
download | mpv-641d102101087a3453398800febce2f65f104203.tar.bz2 mpv-641d102101087a3453398800febce2f65f104203.tar.xz |
msg: slightly improve --msg-time output
Cut the arbitrary offset, and document what unit/timesource it uses.
-rw-r--r-- | DOCS/man/options.rst | 5 | ||||
-rw-r--r-- | common/msg.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index bb92751efb..0572b66816 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4233,7 +4233,10 @@ Terminal Prepend module name to each console message. ``--msg-time`` - Prepend timing information to each console message. + Prepend timing information to each console message. The time is in + microseconds 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. Cache ----- diff --git a/common/msg.c b/common/msg.c index a884fa7d5a..871666add0 100644 --- a/common/msg.c +++ b/common/msg.c @@ -282,7 +282,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()); + fprintf(stream, "[%" PRId64 "] ", mp_time_us() - MP_START_TIME); const char *prefix = log->prefix; if ((lev >= MSGL_V) || root->verbose || root->module) |