Further improvements to the status bar clock
This commit is contained in:
+1
-7
@@ -206,14 +206,8 @@ class GuiMainStatus(QStatusBar):
|
|||||||
if self.refTime is None:
|
if self.refTime is None:
|
||||||
self.timeText.setText("00:00:00")
|
self.timeText.setText("00:00:00")
|
||||||
else:
|
else:
|
||||||
# This is much faster than using datetime format
|
|
||||||
tS = int(time() - self.refTime)
|
tS = int(time() - self.refTime)
|
||||||
tM = tS//60
|
self.timeText.setText(f"{tS//3600:02d}:{(tS//60)%60:02d}:{tS%60:02d}")
|
||||||
tH = tM//60
|
|
||||||
tM %= 60
|
|
||||||
tS %= 60
|
|
||||||
self.timeText.setText(f"{tH:02d}:{tM:02d}:{tS:02d}")
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# END Class GuiMainStatus
|
# END Class GuiMainStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user