From 7a42bfecc25ecb27194b0d2dc78a3265977c45a2 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 11 Jun 2014 15:33:17 +0100 Subject: bitbake: toastergui: fix built ETA calculation We fix the calculation showing the estimated time to build completion. (Bitbake rev: 5d85d1a7bbbce2c9baaa613c5cc84c511fb88376) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/toaster') diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 686cd5c8ce..b38d260d6f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -230,11 +230,10 @@ def builds(request): b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count() else: b.completeper = 0 - b.eta = timezone.now() + + b.eta = 0 if b.completeper > 0: - b.eta += ((timezone.now() - b.started_on)*100/b.completeper) - else: - b.eta = 0 + b.eta = timezone.now() + ((timezone.now() - b.started_on)*(100-b.completeper)/b.completeper) # set up list of fstypes for each build fstypes_map = {}; -- cgit v1.2.3-54-g00ecf