diff --git a/src/integritysetup.c b/src/integritysetup.c index ded1ae10..cba658ba 100644 --- a/src/integritysetup.c +++ b/src/integritysetup.c @@ -137,8 +137,7 @@ static int wipe_callback(uint64_t size, uint64_t offset, void *usrptr) static struct timeval start_time = {}, end_time = {}; int r = 0; - if (!opt_batch_mode) - tools_time_progress(size, offset, &start_time, &end_time); + tools_time_progress(size, offset, &start_time, &end_time); check_signal(&r); if (r) { diff --git a/src/utils_tools.c b/src/utils_tools.c index 08f92818..fea336a7 100644 --- a/src/utils_tools.c +++ b/src/utils_tools.c @@ -351,6 +351,9 @@ void tools_time_progress(uint64_t device_size, uint64_t bytes, double tdiff, mib; int final = (bytes == device_size); + if (opt_batch_mode) + return; + gettimeofday(&now_time, NULL); if (start_time->tv_sec == 0 && start_time->tv_usec == 0) { *start_time = now_time;