mirror of
https://github.com/upa/mscp.git
synced 2026-05-18 01:57:29 +08:00
fix final progress output
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -664,12 +664,15 @@ void mscp_stat_handler(int signum)
|
|||||||
s.done += m.threads[n].done;
|
s.done += m.threads[n].done;
|
||||||
|
|
||||||
gettimeofday(&s.after, NULL);
|
gettimeofday(&s.after, NULL);
|
||||||
if (signum == SIGALRM)
|
if (signum == SIGALRM) {
|
||||||
alarm(1);
|
alarm(1);
|
||||||
|
print_progress(&s.before, &s.after, s.total, s.last, s.done);
|
||||||
print_progress(&s.before, &s.after, s.total, s.last, s.done);
|
s.before = s.after;
|
||||||
s.before = s.after;
|
s.last = s.done;
|
||||||
s.last = s.done;
|
} else {
|
||||||
|
/* called from mscp_stat_final. calculate progress from the beginning */
|
||||||
|
print_progress(&s.start, &s.after, s.total, 0, s.done);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int mscp_stat_init()
|
int mscp_stat_init()
|
||||||
|
|||||||
Reference in New Issue
Block a user