summaryrefslogtreecommitdiff
path: root/lib/pingpong.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-10-25 11:59:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-10-25 18:48:05 +0200
commit5d543fe90670c1924fd2c7d6be871b3ad90c438d (patch)
treed3d4f945d97ff52ab51c30b278f3d16e74e96883 /lib/pingpong.c
parent1d72b5b8916e37191108b67ddfada2d1e1e00635 (diff)
downloadcurl-5d543fe90670c1924fd2c7d6be871b3ad90c438d.tar.gz
time: rename Curl_tvnow to Curl_now
... since the 'tv' stood for timeval and this function does not return a timeval struct anymore. Also, cleaned up the Curl_timediff*() functions to avoid typecasts and clean up the descriptive comments. Closes #2011
Diffstat (limited to 'lib/pingpong.c')
-rw-r--r--lib/pingpong.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 278405f72..438856a99 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -61,12 +61,12 @@ time_t Curl_pp_state_timeout(struct pingpong *pp)
/* Without a requested timeout, we only wait 'response_time' seconds for the
full response to arrive before we bail out */
timeout_ms = response_time -
- Curl_timediff(Curl_tvnow(), pp->response); /* spent time */
+ Curl_timediff(Curl_now(), pp->response); /* spent time */
if(data->set.timeout) {
/* if timeout is requested, find out how much remaining time we have */
timeout2_ms = data->set.timeout - /* timeout time */
- Curl_timediff(Curl_tvnow(), conn->now); /* spent time */
+ Curl_timediff(Curl_now(), conn->now); /* spent time */
/* pick the lowest number */
timeout_ms = CURLMIN(timeout_ms, timeout2_ms);
@@ -120,7 +120,7 @@ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block)
if(Curl_pgrsUpdate(conn))
result = CURLE_ABORTED_BY_CALLBACK;
else
- result = Curl_speedcheck(data, Curl_tvnow());
+ result = Curl_speedcheck(data, Curl_now());
if(result)
return result;
@@ -143,7 +143,7 @@ void Curl_pp_init(struct pingpong *pp)
pp->nread_resp = 0;
pp->linestart_resp = conn->data->state.buffer;
pp->pending_resp = TRUE;
- pp->response = Curl_tvnow(); /* start response time-out now! */
+ pp->response = Curl_now(); /* start response time-out now! */
}
@@ -235,7 +235,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
free(s);
pp->sendthis = NULL;
pp->sendleft = pp->sendsize = 0;
- pp->response = Curl_tvnow();
+ pp->response = Curl_now();
}
return CURLE_OK;
@@ -499,7 +499,7 @@ CURLcode Curl_pp_flushsend(struct pingpong *pp)
free(pp->sendthis);
pp->sendthis = NULL;
pp->sendleft = pp->sendsize = 0;
- pp->response = Curl_tvnow();
+ pp->response = Curl_now();
}
return CURLE_OK;
}