0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00

msg: slightly improve --msg-time output

Cut the arbitrary offset, and document what unit/timesource it uses.
This commit is contained in:
wm4 2020-02-14 16:12:37 +01:00
parent 5793cb40c8
commit 641d102101
2 changed files with 5 additions and 2 deletions

View File

@ -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
-----

View File

@ -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)