diff --git a/SW/PC/Stopwatch/main.py b/SW/PC/Stopwatch/main.py index a140f6b..8248046 100644 --- a/SW/PC/Stopwatch/main.py +++ b/SW/PC/Stopwatch/main.py @@ -6,7 +6,7 @@ gi.require_version('Gtk', '4.0') from gi.repository import Gtk, Gio, Gdk index = 2 -TIME = 10*60 +TIME = 10 class GridRow(): def __init__(self, parent, runner, index): @@ -41,9 +41,13 @@ class GridRow(): def updateTime(self): t = TIME - while t: - mins, secs = divmod(t, 60) - timer = '{:02d}:{:02d}'.format(mins, secs) + while t >= -10: + if t < 0: + mins, secs = divmod((t * -1), 60) + timer = '-{:02d}:{:02d}'.format(mins, secs) + else: + mins, secs = divmod(t, 60) + timer = '{:02d}:{:02d}'.format(mins, secs) self.runb.set_label(timer) time.sleep(1) t -= 1