aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-01-16 18:52:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-01-16 18:52:53 +0000
commit7c8bb5dfff48e47bd102d2b57b1e5eb1f332d903 (patch)
treeb86a3af9bb6569975efcb9794c6efb37f6746fcf /lib
parent63aefdb50b3af26321da2d1cde31e4530e2c1c66 (diff)
Made the progress bar cooler, with ideas from Björn Stenberg <bjorn@haxx.nu>
Diffstat (limited to 'lib')
-rw-r--r--lib/progress.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 6a083370b..2e3f6e975 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -83,7 +83,8 @@ void ProgressInit(struct UrlData *data, int max)
if ( data->progressmode == CURL_PROGRESS_STATS )
fprintf(data->err,
- " %% Received Total Speed Time left Total Curr.Speed\n");
+ " %% Received Total Speed Estimated Time Left Curr.Speed\n");
+
}
void time2str(char *r, int t)
@@ -144,18 +145,21 @@ void ProgressShow(struct UrlData *data,
return;
if(-1 != progressmax) {
- char left[20],estim[20];
+ char left[20];
+ char estim[20];
+ char timespent[20];
int estimate = progressmax/(int) speed;
time2str(left,estimate-(int) spent);
time2str(estim,estimate);
+ time2str(timespent,spent);
percen=(double)point/progressmax;
percen=percen*100;
- fprintf(data->err, "\r%3d %8d %8d %6.0lf %s %s %6.0lf ",
+ fprintf(stderr, "\r%3d %10d %10d %6.0lf %s %s %s %6.0lf ",
(int)percen, point, progressmax,
- speed, left, estim, data->current_speed);
+ speed, estim, timespent, left, data->current_speed);
}
else
fprintf(data->err,