Curl_tvdiff() now returns a millisecond diff, no double like before
This commit is contained in:
@@ -69,9 +69,10 @@ struct timeval Curl_tvnow (void)
|
||||
* 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)
|
||||
long Curl_tvdiff (struct timeval t1, struct timeval t2)
|
||||
{
|
||||
return (double)(t1.tv_sec - t2.tv_sec) + ((t1.tv_usec-t2.tv_usec)/1000000.0);
|
||||
return (t1.tv_sec*1000 + t1.tv_usec/1000)-
|
||||
(t2.tv_sec*1000 + t2.tv_usec/1000);
|
||||
}
|
||||
|
||||
long Curl_tvlong (struct timeval t1)
|
||||
|
||||
Reference in New Issue
Block a user