mirror of
https://github.com/mirror/wget.git
synced 2025-01-06 02:10:28 +08:00
[svn] Force printing of ETA at the end of download.
This commit is contained in:
parent
845a0988b1
commit
e6fd9cb793
@ -1,5 +1,9 @@
|
|||||||
2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* progress.c (create_image): Print the current ETA if we're done
|
||||||
|
with the download.
|
||||||
|
(create_image): Change '-' display char to '+' in the progress bar.
|
||||||
|
|
||||||
* Makefile.in (clean): Remove .libs.
|
* Makefile.in (clean): Remove .libs.
|
||||||
|
|
||||||
2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-09-23 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
@ -688,7 +688,7 @@ create_image (struct bar_progress *bp, double dl_total_time)
|
|||||||
else
|
else
|
||||||
APPEND_LITERAL (" ");
|
APPEND_LITERAL (" ");
|
||||||
|
|
||||||
/* The progress bar: "[====> ]" or "[--==> ]". */
|
/* The progress bar: "[====> ]" or "[++==> ]". */
|
||||||
if (progress_size && bp->total_length > 0)
|
if (progress_size && bp->total_length > 0)
|
||||||
{
|
{
|
||||||
/* Size of the initial portion. */
|
/* Size of the initial portion. */
|
||||||
@ -706,10 +706,10 @@ create_image (struct bar_progress *bp, double dl_total_time)
|
|||||||
*p++ = '[';
|
*p++ = '[';
|
||||||
begin = p;
|
begin = p;
|
||||||
|
|
||||||
/* Print the initial portion of the download with '-' chars, the
|
/* Print the initial portion of the download with '+' chars, the
|
||||||
rest with '=' and one '>'. */
|
rest with '=' and one '>'. */
|
||||||
for (i = 0; i < insz; i++)
|
for (i = 0; i < insz; i++)
|
||||||
*p++ = '-';
|
*p++ = '+';
|
||||||
dlsz -= insz;
|
dlsz -= insz;
|
||||||
if (dlsz > 0)
|
if (dlsz > 0)
|
||||||
{
|
{
|
||||||
@ -780,8 +780,9 @@ create_image (struct bar_progress *bp, double dl_total_time)
|
|||||||
/* Don't change the value of ETA more than approximately once
|
/* Don't change the value of ETA more than approximately once
|
||||||
per second; doing so would cause flashing without providing
|
per second; doing so would cause flashing without providing
|
||||||
any value to the user. */
|
any value to the user. */
|
||||||
if (dl_total_time - bp->last_eta_time < 900
|
if (bp->total_length != size
|
||||||
&& bp->last_eta_value != 0)
|
&& bp->last_eta_value != 0
|
||||||
|
&& dl_total_time - bp->last_eta_time < 900)
|
||||||
eta = bp->last_eta_value;
|
eta = bp->last_eta_value;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user