diff --git a/lib/base/eerror.cpp b/lib/base/eerror.cpp index 192357a549..f87990011d 100644 --- a/lib/base/eerror.cpp +++ b/lib/base/eerror.cpp @@ -145,7 +145,7 @@ int formatTime(char *buf, int bufferSize, int flags) if (debugTime & 1) { clock_gettime(CLOCK_MONOTONIC, &tp); /* Cast to (long long) is to cater for older 32-bit time fields */ - pos += snprintf(buf, bufferSize, "<%6lld.%04lld> ", (long long)tp.tv_sec, (long long)tp.tv_nsec/100000); + pos += snprintf(buf, bufferSize, "<%6lld.%06lld> ", (long long)tp.tv_sec, (long long)tp.tv_nsec/1000); } if (debugTime & 2) { diff --git a/lib/network/socket.cpp b/lib/network/socket.cpp index bd94428cfb..94b4af236f 100644 --- a/lib/network/socket.cpp +++ b/lib/network/socket.cpp @@ -213,7 +213,7 @@ int eSocket::writeBlock(const char *data, unsigned int len) // and eDebug self can cause a call of writeBlock !! struct timespec tp = {}; clock_gettime(CLOCK_MONOTONIC, &tp); - fprintf(stderr, "<%6lu.%06lu> [eSocket] write: %m\n", tp.tv_sec, tp.tv_nsec/1000); + fprintf(stderr, "<%6lld.%06lld> [eSocket] write: %m\n", (long long)tp.tv_sec, (long long)tp.tv_nsec/1000); } if (tw < 0) tw = 0;