mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
lib1900: use tutil_tvnow instead of gettimeofday
Makes it build on windows
This commit is contained in:
parent
10b6d81c64
commit
9e10963c20
@ -168,7 +168,7 @@ int test(char *URL)
|
|||||||
multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
|
multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
|
||||||
multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
|
multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
|
||||||
|
|
||||||
gettimeofday(&last_handle_add, NULL);
|
last_handle_add = tutil_tvnow();
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
struct timeval interval;
|
struct timeval interval;
|
||||||
@ -182,7 +182,7 @@ int test(char *URL)
|
|||||||
interval.tv_usec = 0;
|
interval.tv_usec = 0;
|
||||||
|
|
||||||
if(handlenum < num_handles) {
|
if(handlenum < num_handles) {
|
||||||
gettimeofday(&now, NULL);
|
now = tutil_tvnow();
|
||||||
msnow = now.tv_sec * 1000 + now.tv_usec / 1000;
|
msnow = now.tv_sec * 1000 + now.tv_usec / 1000;
|
||||||
mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000;
|
mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000;
|
||||||
if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) {
|
if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) {
|
||||||
|
Loading…
Reference in New Issue
Block a user