about summary refs log tree commit diff
path: root/resolv/gai_suspend.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/gai_suspend.c')
-rw-r--r--resolv/gai_suspend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/resolv/gai_suspend.c b/resolv/gai_suspend.c
index 16d6998980..b8c642bddc 100644
--- a/resolv/gai_suspend.c
+++ b/resolv/gai_suspend.c
@@ -91,11 +91,11 @@ gai_suspend (const struct gaicb *const list[], int ent,
 	{
 	  /* We have to convert the relative timeout value into an
 	     absolute time value with pthread_cond_timedwait expects.  */
-	  struct timeval now;
+	  struct timespec now;
 	  struct timespec abstime;
 
-	  __gettimeofday (&now, NULL);
-	  abstime.tv_nsec = timeout->tv_nsec + now.tv_usec * 1000;
+          __clock_gettime (CLOCK_REALTIME, &now);
+	  abstime.tv_nsec = timeout->tv_nsec + now.tv_nsec;
 	  abstime.tv_sec = timeout->tv_sec + now.tv_sec;
 	  if (abstime.tv_nsec >= 1000000000)
 	    {