(copy_file_file_display_progress): don't calculate BPS twice.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-06-19 15:07:45 +03:00
parent 78df2f5b56
commit bb1ab8488b

View File

@ -1126,10 +1126,7 @@ copy_file_file_display_progress (file_op_total_context_t * tctx, file_op_context
if (n_read_total == 0)
ctx->eta_secs = 0.0;
else
{
ctx->eta_secs = ((dt / (double) n_read_total) * file_size) - dt;
ctx->bps = n_read_total / ((dt < 1) ? 1 : dt);
}
/* Compute BPS rate */
ctx->bps_time = MAX (1, dt);