mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-24 11:50:21 +00:00
timer: remove MP_START_TIME
instead require mp_raw_time_ns() to not return 0, which all current implementation already should follow.
This commit is contained in:
@@ -316,7 +316,7 @@ static void print_terminal_line(struct mp_log *log, int lev,
|
||||
set_msg_color(stream, lev);
|
||||
|
||||
if (root->show_time)
|
||||
fprintf(stream, "[%10.6f] ", (mp_time_ns() - MP_START_TIME) / 1e9);
|
||||
fprintf(stream, "[%10.6f] ", mp_time_sec());
|
||||
|
||||
const char *prefix = log->prefix;
|
||||
if ((lev >= MSGL_V) || root->verbose || root->module)
|
||||
@@ -551,7 +551,7 @@ static void *log_file_thread(void *p)
|
||||
if (e) {
|
||||
pthread_mutex_unlock(&root->log_file_lock);
|
||||
fprintf(root->log_file, "[%8.3f][%c][%s] %s",
|
||||
(mp_time_ns() - MP_START_TIME) / 1e9,
|
||||
mp_time_sec(),
|
||||
mp_log_levels[e->level][0], e->prefix, e->text);
|
||||
fflush(root->log_file);
|
||||
pthread_mutex_lock(&root->log_file_lock);
|
||||
|
||||
Reference in New Issue
Block a user