summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-25 12:32:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-25 12:32:40 +0000
commitc43a9d9068c759a4af1200b717b0b1d57009cbac (patch)
treeeb8f3719e03881eba6666fe7fd55cd50d9c8929f
parent64e80091db8d76c5472e4857211c0530a9234ae2 (diff)
downloadgnurl-c43a9d9068c759a4af1200b717b0b1d57009cbac.tar.gz
gnurl-c43a9d9068c759a4af1200b717b0b1d57009cbac.tar.bz2
gnurl-c43a9d9068c759a4af1200b717b0b1d57009cbac.zip
timespent is now updated in every call to the progress meter update function
-rw-r--r--lib/progress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/progress.c b/lib/progress.c
index ac2cb23aa..122cb6a15 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);