From a2af807357875f866f149b0f6db4d463d4533204 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 28 Jun 2021 15:43:45 +0200 Subject: [PATCH] Debug messages with timestamps. On most of current hardware, getting monotonic clock is fast enough to get it and write for each debug message. --- sysdep/unix/log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index dc2b14b3..f48588b6 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -439,6 +439,8 @@ done: void log_init_debug(char *f) { + clock_gettime(CLOCK_MONOTONIC, &dbg_time_start); + if (dbgf && dbgf != stderr) fclose(dbgf); if (!f)