modified timer so it counts to -10s
This commit is contained in:
parent
da3215ec5e
commit
c267155b25
@ -6,7 +6,7 @@ gi.require_version('Gtk', '4.0')
|
|||||||
from gi.repository import Gtk, Gio, Gdk
|
from gi.repository import Gtk, Gio, Gdk
|
||||||
|
|
||||||
index = 2
|
index = 2
|
||||||
TIME = 10*60
|
TIME = 10
|
||||||
|
|
||||||
class GridRow():
|
class GridRow():
|
||||||
def __init__(self, parent, runner, index):
|
def __init__(self, parent, runner, index):
|
||||||
@ -41,7 +41,11 @@ class GridRow():
|
|||||||
|
|
||||||
def updateTime(self):
|
def updateTime(self):
|
||||||
t = TIME
|
t = TIME
|
||||||
while t:
|
while t >= -10:
|
||||||
|
if t < 0:
|
||||||
|
mins, secs = divmod((t * -1), 60)
|
||||||
|
timer = '-{:02d}:{:02d}'.format(mins, secs)
|
||||||
|
else:
|
||||||
mins, secs = divmod(t, 60)
|
mins, secs = divmod(t, 60)
|
||||||
timer = '{:02d}:{:02d}'.format(mins, secs)
|
timer = '{:02d}:{:02d}'.format(mins, secs)
|
||||||
self.runb.set_label(timer)
|
self.runb.set_label(timer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user