make display of total transferred more accurate
The throughput display needs a delay period before accounting and displaying anything. Yet it might be called after some amount of data has already been transferred. The display of total data is therefore accounted late and therefore smaller than the reality. Let's call display_throughput() with an absolute amount of transferred data instead of a relative number, and let the throughput code find the relative amount of data by itself as needed. This way the displayed total is always exact. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
0d8aafd252
commit
218558af59
@ -3,7 +3,7 @@
|
||||
|
||||
struct progress;
|
||||
|
||||
void display_throughput(struct progress *progress, unsigned long n);
|
||||
void display_throughput(struct progress *progress, off_t total);
|
||||
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,
|
||||
|
Reference in New Issue
Block a user