From 74adfe0cbca300e73774c6e0aa9b3c53a5e5b57b Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 31 Oct 2021 16:47:03 +0000 Subject: Add HiDPI support and lots of cleanup. --- src/log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/log.c') diff --git a/src/log.c b/src/log.c index eb4d165..a27bc6c 100644 --- a/src/log.c +++ b/src/log.c @@ -1,4 +1,5 @@ #include +#include void log_error(const char *const fmt, ...) { @@ -23,9 +24,11 @@ void log_debug(const char *const fmt, ...) #ifndef DEBUG return; #endif + struct timespec t; + clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t); va_list args; va_start(args, fmt); - printf("[DEBUG]: "); + fprintf(stderr, "[%ld.%03ld][DEBUG]: ", t.tv_sec, t.tv_nsec / 1000000); vprintf(fmt, args); va_end(args); } -- cgit v1.2.3