diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-29 00:08:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-30 23:10:57 +0200 |
commit | 842f73de58f38bd6e285e08bbd1adb6c17cb62cd (patch) | |
tree | c28cb0b85895d71f19373ab732736a5fa671ebff /lib/progress.c | |
parent | fc55c723c4ecebabf12c32caddd0f9bc9d169ed4 (diff) | |
download | curl-842f73de58f38bd6e285e08bbd1adb6c17cb62cd.tar.gz |
timeouts: change millisecond timeouts to timediff_t from time_t
For millisecond timers we like timediff_t better. Also, time_t can be
unsigned so returning a negative value doesn't work then.
Closes #5479
Diffstat (limited to 'lib/progress.c')
-rw-r--r-- | lib/progress.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/progress.c b/lib/progress.c index 60a941ab2..895138448 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -282,9 +282,9 @@ timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize, * stay below 'limit'. */ if(size < CURL_OFF_T_MAX/1000) - minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit); + minimum = (timediff_t) (CURL_OFF_T_C(1000) * size / limit); else { - minimum = (time_t) (size / limit); + minimum = (timediff_t) (size / limit); if(minimum < TIMEDIFF_T_MAX/1000) minimum *= 1000; else |