diff options
| author | thegeorg <[email protected]> | 2024-10-11 21:07:18 +0300 |
|---|---|---|
| committer | thegeorg <[email protected]> | 2024-10-11 21:17:24 +0300 |
| commit | 1df197e6035ea9826bfedee7d48812e318ba9c7a (patch) | |
| tree | 76b8e9de41820755adf209854d06a84a8b5a1988 /contrib/libs/curl/lib/timeval.c | |
| parent | f9c007ea1b59b960201def74990810b26ecdfd48 (diff) | |
Revert "Update contrib/libs/curl to 8.10.1" to fix
Revert "Update contrib/libs/curl to 8.10.1"
This reverts commit 428ef806a15515cdaa325530aa8cc6903fac5fb6, reversing
changes made to 40e46e6394df409d1545a3771c8a47a86ed55eac.
Revert "Fix formatting after rXXXXXX"
This reverts commit a73689311a92e195d14136c5a0049ef1e40b1f3e, reversing
changes made to 17980b8756d1f74d3dacddc7ca4945c30f35611c.
commit_hash:5c5194831e5455b61fbee61619066396626beab1
Diffstat (limited to 'contrib/libs/curl/lib/timeval.c')
| -rw-r--r-- | contrib/libs/curl/lib/timeval.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/curl/lib/timeval.c b/contrib/libs/curl/lib/timeval.c index bb29bfdfee6..5a6727cbc43 100644 --- a/contrib/libs/curl/lib/timeval.c +++ b/contrib/libs/curl/lib/timeval.c @@ -51,8 +51,8 @@ struct curltime Curl_now(void) #pragma warning(pop) #endif - now.tv_sec = (time_t)(milliseconds / 1000); - now.tv_usec = (int)((milliseconds % 1000) * 1000); + now.tv_sec = milliseconds / 1000; + now.tv_usec = (milliseconds % 1000) * 1000; } return now; } @@ -77,7 +77,7 @@ struct curltime Curl_now(void) /* ** clock_gettime() may be defined by Apple's SDK as weak symbol thus - ** code compiles but fails during runtime if clock_gettime() is + ** code compiles but fails during run-time if clock_gettime() is ** called on unsupported OS version. */ #if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \ @@ -95,7 +95,7 @@ struct curltime Curl_now(void) #endif (0 == clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow))) { cnow.tv_sec = tsnow.tv_sec; - cnow.tv_usec = (int)(tsnow.tv_nsec / 1000); + cnow.tv_usec = (unsigned int)(tsnow.tv_nsec / 1000); } else #endif @@ -107,18 +107,18 @@ struct curltime Curl_now(void) #endif (0 == clock_gettime(CLOCK_MONOTONIC, &tsnow))) { cnow.tv_sec = tsnow.tv_sec; - cnow.tv_usec = (int)(tsnow.tv_nsec / 1000); + cnow.tv_usec = (unsigned int)(tsnow.tv_nsec / 1000); } /* ** Even when the configure process has truly detected monotonic clock ** availability, it might happen that it is not actually available at - ** runtime. When this occurs simply fallback to other time source. + ** run-time. When this occurs simply fallback to other time source. */ #ifdef HAVE_GETTIMEOFDAY else { (void)gettimeofday(&now, NULL); cnow.tv_sec = now.tv_sec; - cnow.tv_usec = (int)now.tv_usec; + cnow.tv_usec = (unsigned int)now.tv_usec; } #else else { @@ -137,7 +137,7 @@ struct curltime Curl_now(void) struct curltime Curl_now(void) { /* - ** Monotonic timer on macOS is provided by mach_absolute_time(), which + ** Monotonic timer on Mac OS is provided by mach_absolute_time(), which ** returns time in Mach "absolute time units," which are platform-dependent. ** To convert to nanoseconds, one must use conversion factors specified by ** mach_timebase_info(). |
