+2000-02-12 <tytso@snap.thunk.org>
+
+ * unix.c (e2fsck_update_progress): Limit the number of updates to
+ the progress bars to 8 times a second. This allows a 9600
+ baud console link to keep up.
+
2000-02-11 <tytso@snap.thunk.org>
* unix.c (main): If compression is enabled on the filesystem,
char buf[80];
int i;
float percent;
+ int tick;
+ struct timeval tv;
if (pass == 0)
return 0;
} else {
if (ctx->flags & E2F_FLAG_PROG_SUPPRESS)
return 0;
+ gettimeofday(&tv, NULL);
+ tick = (tv.tv_sec << 3) + (tv.tv_usec / (1000000 / 8));
+ if ((tick == ctx->progress_last_time) &&
+ (cur != max) && (cur != 0))
+ return 0;
+ ctx->progress_last_time = tick;
ctx->progress_pos = (ctx->progress_pos+1) & 3;
ctx->flags |= E2F_FLAG_PROG_BAR;
percent = calc_percent(&e2fsck_tbl, pass, cur, max);