]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1900: use tutil_tvnow instead of gettimeofday
authorSergei Nikulov <sergey.nikulov@gmail.com>
Tue, 11 Jun 2013 22:04:03 +0000 (02:04 +0400)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 12 Jun 2013 08:52:23 +0000 (10:52 +0200)
Makes it build on windows

tests/libtest/lib1900.c

index 7bee97a2144d9a71c81ae3c65882c0a55bde8b93..74a0e6f582b9a7c6a4ba899e1d1fa52383e29ba4 100644 (file)
@@ -168,7 +168,7 @@ int test(char *URL)
   multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
   multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
 
-  gettimeofday(&last_handle_add, NULL);
+  last_handle_add = tutil_tvnow();
 
   for(;;) {
     struct timeval interval;
@@ -182,7 +182,7 @@ int test(char *URL)
     interval.tv_usec = 0;
 
     if(handlenum < num_handles) {
-      gettimeofday(&now, NULL);
+      now = tutil_tvnow();
       msnow = now.tv_sec * 1000 + now.tv_usec / 1000;
       mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000;
       if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) {