diff --git a/plugins/clock_monotonic/clock_monotonic.c b/plugins/clock_monotonic/clock_monotonic.c index e6d1c27f..a55fbb48 100644 --- a/plugins/clock_monotonic/clock_monotonic.c +++ b/plugins/clock_monotonic/clock_monotonic.c @@ -11,7 +11,7 @@ time_t uwsgi_monotonic_seconds() { uint64_t uwsgi_monotonic_microseconds() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return (ts.tv_sec * 1000000) + (ts.tv_nsec*1000); + return (ts.tv_sec * 1000000) + (ts.tv_nsec/1000); } diff --git a/plugins/clock_realtime/clock_realtime.c b/plugins/clock_realtime/clock_realtime.c index dd83ee40..043c5768 100644 --- a/plugins/clock_realtime/clock_realtime.c +++ b/plugins/clock_realtime/clock_realtime.c @@ -11,7 +11,7 @@ time_t uwsgi_realtime_seconds() { uint64_t uwsgi_realtime_microseconds() { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); - return (ts.tv_sec * 1000000) + (ts.tv_nsec*1000); + return (ts.tv_sec * 1000000) + (ts.tv_nsec/1000); }