mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Print the total download time as part of the summary for recursive downloads.
This commit is contained in:
parent
ea96533903
commit
69fb378d59
@ -1,3 +1,7 @@
|
||||
2010-10-24 Jessica McKellar <jesstess@mit.edu> (tiny change)
|
||||
|
||||
* NEWS: Mention the change to the the summary for recursive downloads.
|
||||
|
||||
2010-10-23 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* configure.ac: Add check for libgpg-error and libgcrypt.
|
||||
|
2
NEWS
2
NEWS
@ -46,6 +46,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
||||
links.
|
||||
|
||||
** Use persistent connections with proxies supporting them.
|
||||
|
||||
** Print the total download time as part of the summary for recursive downloads.
|
||||
|
||||
* Changes in Wget 1.12
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2010-10-24 Jessica McKellar <jesstess@mit.edu> (tiny change)
|
||||
|
||||
* main.c (main): Print the total download time as part of the
|
||||
summary for downloads using the recursive or page requisites
|
||||
options. Fixes bug #21359.
|
||||
|
||||
2010-10-24 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* gnutls.c (wgnutls_peek): Do not return an error when
|
||||
|
26
src/main.c
26
src/main.c
@ -55,6 +55,7 @@ as that of the covered work. */
|
||||
#include "convert.h"
|
||||
#include "spider.h"
|
||||
#include "http.h" /* for save_cookies */
|
||||
#include "ptimer.h"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <getpass.h>
|
||||
@ -877,6 +878,9 @@ main (int argc, char **argv)
|
||||
|
||||
program_name = argv[0];
|
||||
|
||||
struct ptimer *timer = ptimer_new ();
|
||||
double start_time = ptimer_measure (timer);
|
||||
|
||||
i18n_initialize ();
|
||||
|
||||
/* Construct the name of the executable, without the directory part. */
|
||||
@ -1347,13 +1351,23 @@ outputting to a regular file.\n"));
|
||||
&&
|
||||
total_downloaded_bytes != 0)
|
||||
{
|
||||
double end_time = ptimer_measure (timer);
|
||||
ptimer_destroy (timer);
|
||||
|
||||
char *wall_time = xstrdup (secs_to_human_time (end_time - start_time));
|
||||
char *download_time = xstrdup (secs_to_human_time (total_download_time));
|
||||
logprintf (LOG_NOTQUIET,
|
||||
_("FINISHED --%s--\nDownloaded: %d files, %s in %s (%s)\n"),
|
||||
datetime_str (time (NULL)),
|
||||
numurls,
|
||||
human_readable (total_downloaded_bytes),
|
||||
secs_to_human_time (total_download_time),
|
||||
retr_rate (total_downloaded_bytes, total_download_time));
|
||||
_("FINISHED --%s--\nTotal wall clock time: %s\n"
|
||||
"Downloaded: %d files, %s in %s (%s)\n"),
|
||||
datetime_str (time (NULL)),
|
||||
wall_time,
|
||||
numurls,
|
||||
human_readable (total_downloaded_bytes),
|
||||
download_time,
|
||||
retr_rate (total_downloaded_bytes, total_download_time));
|
||||
xfree (wall_time);
|
||||
xfree (download_time);
|
||||
|
||||
/* Print quota warning, if exceeded. */
|
||||
if (opt.quota && total_downloaded_bytes > opt.quota)
|
||||
logprintf (LOG_NOTQUIET,
|
||||
|
Loading…
Reference in New Issue
Block a user