Dirk Manske increased the resolution for what the CURLINFO_*_TIME return.

This commit is contained in:
Daniel Stenberg
2004-04-09 09:36:31 +00:00
parent de8660a96a
commit 2fd463e979
3 changed files with 27 additions and 7 deletions

View File

@@ -98,6 +98,17 @@ long curlx_tvdiff(struct timeval newer, struct timeval older)
(newer.tv_usec-older.tv_usec)/1000;
}
/*
* Same as curlx_tvdiff but with full usec resolution.
*
* Returns: the time difference in seconds with subsecond resolution.
*/
double curlx_tvdiff_secs(struct timeval newer, struct timeval older)
{
return (double)(newer.tv_sec-older.tv_sec)+
(double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
/* return the number of seconds in the given input timeval struct */
long Curl_tvlong(struct timeval t1)
{