diff mbox series

[v2] knotty: show elapsed time on the task progress bar

Message ID 20260827100146.11256-1-wxbet.oe@gmail.com
State New
Headers show
Series [v2] knotty: show elapsed time on the task progress bar | expand

Commit Message

WXbet Aug. 27, 2026, 10:01 a.m. UTC
The progress bar for the overall build shows a percentage and a bar but no
elapsed time, although a build easily runs for hours.

Add progressbar's Timer widget to it, which prints the same way as the bars
of the initialisation phase that stay on screen above it.

Signed-off-by: WXbet <wxbet.oe@gmail.com>
---
 lib/bb/ui/knotty.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 15025e8dd..1a3198b5c 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -354,7 +354,7 @@  class TerminalFilter(object):
                 msg = "Currently %2s running tasks (%s)" % (len(activetasks), cur_tasks)
             maxtask = self.helper.tasknumber_total
             if not self.main_progress or self.main_progress.maxval != maxtask:
-                widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()]
+                widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.Timer()]
                 self.main_progress = BBProgress("Running tasks", maxtask, widgets=widgets, resize_handler=self.sigwinch_handle)
                 self.main_progress.fd = self._footer_buf
                 self.main_progress.start(False)