diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2020-06-17 23:11:32 +0200 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2020-06-17 23:11:32 +0200 |
| commit | 8bd466a54684ebb6e8428d442031498fc5bfc569 (patch) | |
| tree | 639a1fd8a5211fc967e308e45b08728d887e0ed3 | |
| parent | 57166cf898fb46830448778f47c825c876a263f1 (diff) | |
| download | curl-badger/fewer-time-calls.tar.gz | |
fixup mistakes from earlier code attemptsbadger/fewer-time-calls
| -rw-r--r-- | lib/asyn-thread.c | 8 | ||||
| -rw-r--r-- | lib/hostip.c | 2 | ||||
| -rw-r--r-- | lib/telnet.c | 2 | ||||
| -rw-r--r-- | lib/vssh/libssh.c | 2 | ||||
| -rw-r--r-- | lib/vssh/wolfssh.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index f0edcaf8f..f4931eadb 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -625,7 +625,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, else { /* poll for name lookup done with exponential backoff up to 250ms */ /* should be fine even if this converts to 32 bit */ - timediff_t elapsed = Curl_timediff(data->multi->mnow, + timediff_t elapsed = Curl_timediff(Curl_mnow(data->multi), data->progress.t_startsingle); if(elapsed < 0) elapsed = 0; @@ -671,7 +671,7 @@ int Curl_resolver_getsock(struct connectdata *conn, } else { #endif - ms = Curl_timediff(data->multi->mnow, reslv->start); + ms = Curl_timediff(Curl_mnow(data->multi), reslv->start); if(ms < 3) milli = 0; else if(ms <= 50) @@ -703,7 +703,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, *waitp = 0; /* default to synchronous response */ - reslv->start = data->multi->mnow; + reslv->start = Curl_mnow(data->multi); /* fire up a new resolver thread! */ if(init_resolve_thread(conn, hostname, port, NULL)) { @@ -759,7 +759,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, hints.ai_socktype = (conn->transport == TRNSPRT_TCP)? SOCK_STREAM : SOCK_DGRAM; - reslv->start = data->multi->mnow; + reslv->start = Curl_mnow(data->multi); /* fire up a new resolver thread! */ if(init_resolve_thread(conn, hostname, port, &hints)) { *waitp = 1; /* expect asynchronous response */ diff --git a/lib/hostip.c b/lib/hostip.c index 6020cba3e..0b77ef8cc 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -783,7 +783,7 @@ clean_up: the time we spent until now! */ if(prev_alarm) { /* there was an alarm() set before us, now put it back */ - timediff_t elapsed_secs = Curl_timediff(data->multi->mnow, + timediff_t elapsed_secs = Curl_timediff(Curl_mnow(data->multi), conn->created) / 1000; /* the alarm period is counted in even number of seconds */ diff --git a/lib/telnet.c b/lib/telnet.c index 752a23866..b5ede2145 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -1560,7 +1560,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } if(data->set.timeout) { - now = data->multi->mnow; + now = Curl_mnow(data->multi); if(Curl_timediff(now, conn->created) >= data->set.timeout) { failf(data, "Time-out"); result = CURLE_OPERATION_TIMEDOUT; diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 457d1d3aa..dac5a425d 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -2089,7 +2089,7 @@ static CURLcode myssh_block_statemach(struct connectdata *conn, while((sshc->state != SSH_STOP) && !result) { bool block; timediff_t left = 1000; - struct curltime now = data->multi->mnow; + struct curltime now = Curl_mnow(data->multi); result = myssh_statemach_act(conn, &block); if(result) diff --git a/lib/vssh/wolfssh.c b/lib/vssh/wolfssh.c index ae4314bd8..f587bc15c 100644 --- a/lib/vssh/wolfssh.c +++ b/lib/vssh/wolfssh.c @@ -982,7 +982,7 @@ static CURLcode wssh_block_statemach(struct connectdata *conn, while((sshc->state != SSH_STOP) && !result) { bool block; timediff_t left = 1000; - struct curltime now = data->multi->mnow; + struct curltime now = Curl_mnow(data->multi); result = wssh_statemach_act(conn, &block); if(result) |
