From e0d15a882ea241832f143c6e4a9876690b5980fe Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 15 Oct 2020 20:56:09 +0200 Subject: [PATCH] Further improvements to the status bar clock --- nw/gui/statusbar.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nw/gui/statusbar.py b/nw/gui/statusbar.py index 91a86519..da8a0427 100644 --- a/nw/gui/statusbar.py +++ b/nw/gui/statusbar.py @@ -206,14 +206,8 @@ class GuiMainStatus(QStatusBar): if self.refTime is None: self.timeText.setText("00:00:00") else: - # This is much faster than using datetime format tS = int(time() - self.refTime) - tM = tS//60 - tH = tM//60 - tM %= 60 - tS %= 60 - self.timeText.setText(f"{tH:02d}:{tM:02d}:{tS:02d}") - + self.timeText.setText(f"{tS//3600:02d}:{(tS//60)%60:02d}:{tS%60:02d}") return # END Class GuiMainStatus