From: Daniel Stenberg Date: Mon, 1 Oct 2001 22:50:20 +0000 (+0000) Subject: added comment to the tvdiff X-Git-Tag: curl-7_9_1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0fa858885a490c4184f82e7273656be83a5c586;p=thirdparty%2Fcurl.git added comment to the tvdiff --- diff --git a/lib/timeval.c b/lib/timeval.c index 0535c15111..4099ede99d 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -65,6 +65,10 @@ struct timeval Curl_tvnow (void) return now; } +/* + * Make sure that the first argument is the more recent time, as otherwise + * we'll get a weird negative time-diff back... + */ double Curl_tvdiff (struct timeval t1, struct timeval t2) { return (double)(t1.tv_sec - t2.tv_sec) + ((t1.tv_usec-t2.tv_usec)/1000000.0);