From 1d4aa376e6111e90888a30ae24d2bcd7f978ec51 Mon Sep 17 00:00:00 2001 From: Anastasius Date: Tue, 18 Oct 2022 12:42:39 -0700 Subject: [PATCH] Predictable long operation check for time estimation --- modules/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui.py b/modules/ui.py index fa54110b..38ba1138 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -268,7 +268,7 @@ def calc_time_left(progress, threshold, label, force_display): time_since_start = time.time() - shared.state.time_start eta = (time_since_start/progress) eta_relative = eta-time_since_start - if eta_relative > threshold or force_display: + if (eta_relative > threshold and progress > 0.02) or force_display: return label + time.strftime('%H:%M:%S', time.gmtime(eta_relative)) else: return ""