fix: timer state control

This commit is contained in:
2026-08-13 16:22:23 +08:00
parent 4a2d72aab3
commit ff3713cf52
+11 -4
View File
@@ -224,8 +224,13 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
@classmethod @classmethod
def perform(cls): def perform(cls):
if status == Status.RUNNING: return False if status == Status.RUNNING:
sleep(0.2); return True timer.start()
return False
timer.pause()
sleep(0.2)
return True
class Timeout(Action): class Timeout(Action):
clock = Timer() clock = Timer()
@@ -238,8 +243,10 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
@classmethod @classmethod
def perform(cls): def perform(cls):
if cls.clock.delta() > parameters['timeout']: raise cls if cls.clock.delta() > parameters['timeout']:
sleep(0.2); return True raise cls
sleep(0.2)
return True
class Acknowledge(Action): class Acknowledge(Action):
@classmethod @classmethod