diff options
-rw-r--r-- | log.c | 4 | ||||
-rw-r--r-- | passt.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -68,7 +68,7 @@ void vlogmsg(bool newline, int pri, const char *format, va_list ap) struct timespec tp; if (debug_print) { - clock_gettime(CLOCK_REALTIME, &tp); + clock_gettime(CLOCK_MONOTONIC, &tp); fprintf(stderr, logtime_fmt_and_arg(&tp)); fprintf(stderr, ": "); } @@ -382,7 +382,7 @@ void logfile_write(bool newline, int pri, const char *format, va_list ap) char buf[BUFSIZ]; int n; - if (clock_gettime(CLOCK_REALTIME, &now)) + if (clock_gettime(CLOCK_MONOTONIC, &now)) return; n = snprintf(buf, BUFSIZ, logtime_fmt_and_arg(&now)); @@ -207,7 +207,7 @@ int main(int argc, char **argv) struct timespec now; struct sigaction sa; - clock_gettime(CLOCK_REALTIME, &log_start); + clock_gettime(CLOCK_MONOTONIC, &log_start); arch_avx2_exec(argv); |