]> granicus.if.org Git - curl/commitdiff
timespent is now updated in every call to the progress meter update function
authorDaniel Stenberg <daniel@haxx.se>
Thu, 25 Jan 2001 12:32:40 +0000 (12:32 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Jan 2001 12:32:40 +0000 (12:32 +0000)
lib/progress.c

index ac2cb23aa5d1edadb45a8437119da8dcf50b05f7..122cb6a15b5b896a4ef88737a867c883c5b22643 100644 (file)
@@ -212,14 +212,14 @@ int Curl_pgrsUpdate(struct UrlData *data)
 
   now = Curl_tvnow(); /* what time is it */
 
+  /* The exact time spent so far */
+  data->progress.timespent = Curl_tvdiff (now, data->progress.start);
+
   if(data->progress.lastshow == Curl_tvlong(now))
     return 0; /* never update this more than once a second if the end isn't 
                  reached */
   data->progress.lastshow = now.tv_sec;
 
-  /* The exact time spent so far */
-  data->progress.timespent = Curl_tvdiff (now, data->progress.start);
-
   /* The average download speed this far */
   data->progress.dlspeed = data->progress.downloaded/(data->progress.timespent!=0.0?data->progress.timespent:1.0);