]> granicus.if.org Git - curl/commitdiff
progress: progress.timespent needs to be us
authorDaniel Stenberg <daniel@haxx.se>
Sat, 24 Jun 2017 19:14:50 +0000 (21:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 24 Jun 2017 19:14:50 +0000 (21:14 +0200)
follow-up to 64ed44a815e4e to fix test 500 failures

lib/progress.c

index dce756b7bad19463b88d2ce6d4f3c328fe0a9315..457b4bd03d03fa90089313cf40a66ebfaafa74a5 100644 (file)
@@ -361,8 +361,8 @@ int Curl_pgrsUpdate(struct connectdata *conn)
   now = Curl_tvnow(); /* what time is it */
 
   /* The time spent so far (from the start) */
-  data->progress.timespent = Curl_tvdiff(now, data->progress.start);
-  timespent = (curl_off_t)data->progress.timespent/1000; /* integer seconds */
+  data->progress.timespent = Curl_tvdiff_us(now, data->progress.start);
+  timespent = (curl_off_t)data->progress.timespent/1000000; /* seconds */
 
   /* The average download speed this far */
   data->progress.dlspeed = (curl_off_t)