fetch: print total time when done, instead of 0.0 remaining
This commit is contained in:
parent
c24d743740
commit
d9d3f52fa8
@ -101,12 +101,13 @@ void print_progress(int force) {
|
|||||||
fprintf(stderr," %.2f Kbps", s);
|
fprintf(stderr," %.2f Kbps", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fetch_options.content_length) {
|
if (!force && fetch_options.content_length) {
|
||||||
if (rate > 0.0) {
|
if (rate > 0.0) {
|
||||||
double remaining = (double)(fetch_options.content_length - fetch_options.size) / rate;
|
double remaining = (double)(fetch_options.content_length - fetch_options.size) / rate;
|
||||||
|
|
||||||
fprintf(stderr," (%.2f sec remaining)", remaining);
|
fprintf(stderr," (%.2f sec remaining)", remaining);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fprintf(stderr," (%.2f sec elapsed)", timediff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr,"\033[K\033[?25h");
|
fprintf(stderr,"\033[K\033[?25h");
|
||||||
|
Loading…
Reference in New Issue
Block a user