add throughput to progress display

This adds the ability for the progress code to also display transfer
throughput when that makes sense.

The math was inspired by commit c548cf4ee0
from Linus.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicolas Pitre
2007-10-30 14:57:34 -04:00
committed by Junio C Hamano
parent 4d4fcc5451
commit cf84d51c43
2 changed files with 77 additions and 4 deletions

View File

@ -3,6 +3,7 @@
struct progress;
void display_throughput(struct progress *progress, unsigned long n);
int display_progress(struct progress *progress, unsigned n);
struct progress *start_progress(const char *title, unsigned total);
struct progress *start_progress_delay(const char *title, unsigned total,