mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Ensure delta is >= 1 before verification speed calculation
Fixes #412
This commit is contained in:
parent
d7360eef3e
commit
3d1042e27e
|
@ -1176,7 +1176,7 @@ class LegendaryCLI:
|
||||||
percentage = (processed / total_size) * 100.0
|
percentage = (processed / total_size) * 100.0
|
||||||
num += 1
|
num += 1
|
||||||
|
|
||||||
if (delta := ((current_time := time.time()) - last_update)) > 1 or not last_processed:
|
if (delta := ((current_time := time.time()) - last_update)) > 1 or (not last_processed and delta > 1):
|
||||||
last_update = current_time
|
last_update = current_time
|
||||||
speed = (processed - last_processed) / 1024 / 1024 / delta
|
speed = (processed - last_processed) / 1024 / 1024 / delta
|
||||||
last_processed = processed
|
last_processed = processed
|
||||||
|
|
Loading…
Reference in a new issue