summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-06-28 15:43:45 +0200
committerMaria Matejka <mq@ucw.cz>2021-11-22 19:05:43 +0100
commita2af807357875f866f149b0f6db4d463d4533204 (patch)
tree96445f4e347ba584bd5c99a78c4a28865c15469d /sysdep/unix
parentdf3264f51ff38c9366398564a9d342a26bc83f37 (diff)
Debug messages with timestamps.
On most of current hardware, getting monotonic clock is fast enough to get it and write for each debug message.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/log.c2
1 files changed, 2 insertions, 0 deletions
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)