mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(copy_file_file_display_progress): don't calculate BPS twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
78df2f5b56
commit
bb1ab8488b
@ -1126,10 +1126,7 @@ copy_file_file_display_progress (file_op_total_context_t * tctx, file_op_context
|
|||||||
if (n_read_total == 0)
|
if (n_read_total == 0)
|
||||||
ctx->eta_secs = 0.0;
|
ctx->eta_secs = 0.0;
|
||||||
else
|
else
|
||||||
{
|
|
||||||
ctx->eta_secs = ((dt / (double) n_read_total) * file_size) - dt;
|
ctx->eta_secs = ((dt / (double) n_read_total) * file_size) - dt;
|
||||||
ctx->bps = n_read_total / ((dt < 1) ? 1 : dt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compute BPS rate */
|
/* Compute BPS rate */
|
||||||
ctx->bps_time = MAX (1, dt);
|
ctx->bps_time = MAX (1, dt);
|
||||||
|
Loading…
Reference in New Issue
Block a user