aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/timeval.c
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-10-18 20:31:38 +0300
committerGitHub <noreply@github.com>2024-10-18 20:31:38 +0300
commit2a74bac2d2d3bccb4e10120f1ead805640ec9dd0 (patch)
tree047e4818ced5aaf73f58517629e5260b5291f9f0 /contrib/libs/curl/lib/timeval.c
parent2d9656823e9521d8c29ea4c9a1d0eab78391abfc (diff)
parent3d834a1923bbf9403cd4a448e7f32b670aa4124f (diff)
downloadydb-2a74bac2d2d3bccb4e10120f1ead805640ec9dd0.tar.gz
Merge pull request #10502 from ydb-platform/mergelibs-241016-1210
Library import 241016-1210
Diffstat (limited to 'contrib/libs/curl/lib/timeval.c')
-rw-r--r--contrib/libs/curl/lib/timeval.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/curl/lib/timeval.c b/contrib/libs/curl/lib/timeval.c
index bb29bfdfee..5a6727cbc4 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().