Ensure to overwrite the latest status line

This commit is contained in:
Andrea Mazzoleni 2016-12-22 15:51:25 +01:00
parent faa3ca9bf8
commit e650029141

View file

@ -4128,8 +4128,12 @@ void state_progress_end(struct snapraid_state* state, block_off_t countpos, bloc
elapsed = now - state->progress_whole_start - state->progress_wasted;
msg_bar("%u%% completed, %u MB accessed", countpos * 100 / countmax, countsize_MB);
if (elapsed >= 60)
msg_bar(" in %u:%02u", (unsigned)(elapsed / 3600), (unsigned)((elapsed % 3600) / 60));
msg_bar(" in %u:%02u", (unsigned)(elapsed / 3600), (unsigned)((elapsed % 3600) / 60));
/* some extra spaces to ensure to overwrite the latest status line */
msg_bar(" ");
msg_bar("\n");
msg_flush();
}