diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-07-31 15:30:31 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-01 07:43:24 +0200 |
commit | b1616dad8f088d873d88f88b4d884335a4ca285f (patch) | |
tree | 31637b618958b051693d23591042468243fe0b35 /lib/pingpong.c | |
parent | 7c14dde9240a6a113358fe551f378328a41477e2 (diff) |
timediff: make it 64 bit (if possible) even with 32 bit time_t
... to make it hold microseconds too.
Fixes #4165
Closes #4168
Diffstat (limited to 'lib/pingpong.c')
-rw-r--r-- | lib/pingpong.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c index 76783d41e..d0710053b 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -60,12 +60,12 @@ time_t Curl_pp_state_timeout(struct pingpong *pp, bool disconnecting) /* 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_now(), pp->response); /* spent time */ + (time_t)Curl_timediff(Curl_now(), pp->response); /* spent time */ if(data->set.timeout && !disconnecting) { /* if timeout is requested, find out how much remaining time we have */ time_t timeout2_ms = data->set.timeout - /* timeout time */ - Curl_timediff(Curl_now(), conn->now); /* spent time */ + (time_t)Curl_timediff(Curl_now(), conn->now); /* spent time */ /* pick the lowest number */ timeout_ms = CURLMIN(timeout_ms, timeout2_ms); |