X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Ftimeval.c;h=629f1c8f07f8073dedf0aa5605dcfe3c98fbe295;hb=88d478478059f53e6de0d1267c3a1e6b02c4273f;hp=f3b207a37e71d78d18eb3281b18671768bfd435a;hpb=e9bdad71c8277e20607fa1eaf0027d53a0dc1f37;p=platform%2Fupstream%2Fcurl.git diff --git a/lib/timeval.c b/lib/timeval.c index f3b207a..629f1c8 100644 --- a/lib/timeval.c +++ b/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. */ -time_t curlx_tvdiff(struct timeval newer, struct timeval older) +long 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 @@ time_t curlx_tvdiff(struct timeval newer, struct timeval older) return 0x7fffffff; #endif return (newer.tv_sec-older.tv_sec)*1000+ - (time_t)(newer.tv_usec-older.tv_usec)/1000; + (long)(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 */ -time_t Curl_tvlong(struct timeval t1) +long Curl_tvlong(struct timeval t1) { return t1.tv_sec; }