summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/timeval.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-07 16:38:00 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-07 16:38:00 (GMT)
commit1df9d5f91944e0b5ba00815d55bb7dc545053b4c (patch)
tree7f3ac8bf78c485cd3254a16754657bd5d43bd561 /Utilities/cmcurl/lib/timeval.c
parentf4a3290ae7ae096f8b92f7adfba7088e6918bc0b (diff)
parent4cc2908fdaaf1ab8afe5c2ae5dbb3401859a9aab (diff)
downloadCMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.zip
CMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.tar.gz
CMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2016-12-22 (44b9b4d4)
Diffstat (limited to 'Utilities/cmcurl/lib/timeval.c')
-rw-r--r--Utilities/cmcurl/lib/timeval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/timeval.c b/Utilities/cmcurl/lib/timeval.c
index 629f1c8..f3b207a 100644
--- a/Utilities/cmcurl/lib/timeval.c
+++ b/Utilities/cmcurl/lib/timeval.c
@@ -116,7 +116,7 @@ struct timeval curlx_tvnow(void)
* Returns: the time difference in number of milliseconds. For large diffs it
* returns 0x7fffffff on 32bit time_t systems.
*/
-long curlx_tvdiff(struct timeval newer, struct timeval older)
+time_t curlx_tvdiff(struct timeval newer, struct timeval older)
{
#if SIZEOF_TIME_T < 8
/* for 32bit time_t systems, add a precaution to avoid overflow for really
@@ -126,7 +126,7 @@ long curlx_tvdiff(struct timeval newer, struct timeval older)
return 0x7fffffff;
#endif
return (newer.tv_sec-older.tv_sec)*1000+
- (long)(newer.tv_usec-older.tv_usec)/1000;
+ (time_t)(newer.tv_usec-older.tv_usec)/1000;
}
/*
@@ -144,7 +144,7 @@ double curlx_tvdiff_secs(struct timeval newer, struct timeval older)
}
/* return the number of seconds in the given input timeval struct */
-long Curl_tvlong(struct timeval t1)
+time_t Curl_tvlong(struct timeval t1)
{
return t1.tv_sec;
}