diff options
Diffstat (limited to 'resolv/gai_misc.c')
-rw-r--r-- | resolv/gai_misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resolv/gai_misc.c b/resolv/gai_misc.c index 8738359..760c33a 100644 --- a/resolv/gai_misc.c +++ b/resolv/gai_misc.c @@ -357,13 +357,13 @@ handle_requests (void *arg) something to arrive in it. */ if (runp == NULL && optim.gai_idle_time >= 0) { - struct timeval now; + struct timespec now; struct timespec wakeup_time; ++idle_thread_count; - gettimeofday (&now, NULL); + __clock_gettime (CLOCK_REALTIME, &now); wakeup_time.tv_sec = now.tv_sec + optim.gai_idle_time; - wakeup_time.tv_nsec = now.tv_usec * 1000; + wakeup_time.tv_nsec = now.tv_nsec; if (wakeup_time.tv_nsec >= 1000000000) { wakeup_time.tv_nsec -= 1000000000; |