From: Daniel Stenberg Date: Thu, 25 Jan 2001 12:32:40 +0000 (+0000) Subject: timespent is now updated in every call to the progress meter update function X-Git-Tag: curl-7_6-pre4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c43a9d9068c759a4af1200b717b0b1d57009cbac;p=thirdparty%2Fcurl.git timespent is now updated in every call to the progress meter update function --- diff --git a/lib/progress.c b/lib/progress.c index ac2cb23aa5..122cb6a15b 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -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);