From a8ce5efba92a87ee57ae2241a9af4083cbad9049 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 1 Jan 2018 22:11:13 +1300 Subject: progress: calculate transfer speed on milliseconds if possible to increase accuracy for quick transfers Fixes #2200 Closes #2206 --- lib/curl_setup.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/curl_setup.h') diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 25a7b4c54..609ee9ead 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -416,6 +416,14 @@ # endif #endif +#if (SIZEOF_CURL_OFF_T == 4) +# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF) +#else + /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ +# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) +#endif +#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1)) + /* * Arg 2 type for gethostname in case it hasn't been defined in config file. */ -- cgit v1.2.3