Skip to content
Snippets Groups Projects
Commit c43a9d90 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

timespent is now updated in every call to the progress meter update function

parent 64e80091
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment