mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Fake a miniscule amount of download time when none is detected.
This commit is contained in:
parent
1da2947d50
commit
212eb1ddaf
@ -1,3 +1,8 @@
|
||||
2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* progress.c (bar_finish): If the timer didn't record any time
|
||||
since the download beginning, fake 1ms.
|
||||
|
||||
2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* recur.c (recursive_retrieve): Fix typo.
|
||||
|
@ -439,8 +439,15 @@ static void
|
||||
bar_finish (void *progress)
|
||||
{
|
||||
struct bar_progress *bp = progress;
|
||||
long elapsed = wtimer_elapsed (bp->timer);
|
||||
|
||||
create_image (bp, wtimer_elapsed (bp->timer));
|
||||
if (elapsed == 0)
|
||||
/* If the download was faster than the granularity of the timer,
|
||||
fake some output so that we don't get the ugly "----.--" rate
|
||||
at the download finish. */
|
||||
elapsed = 1;
|
||||
|
||||
create_image (bp, elapsed);
|
||||
display_image (bp->buffer);
|
||||
|
||||
logputs (LOG_VERBOSE, "\n\n");
|
||||
|
Loading…
Reference in New Issue
Block a user