mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-08-21 21:17:43 +00:00
fixed nanoseconds/microseconds conversion
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user