From ff3713cf528b97753d710ef854be0c511fa00d38 Mon Sep 17 00:00:00 2001 From: Break27 Date: Thu, 13 Aug 2026 16:22:23 +0800 Subject: [PATCH] fix: timer state control --- main.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 3c86be0..d50fba3 100644 --- a/main.py +++ b/main.py @@ -224,8 +224,13 @@ def main(driver: Chrome, logger = logging.getLogger('main')): @classmethod def perform(cls): - if status == Status.RUNNING: return False - sleep(0.2); return True + if status == Status.RUNNING: + timer.start() + return False + + timer.pause() + sleep(0.2) + return True class Timeout(Action): clock = Timer() @@ -238,8 +243,10 @@ def main(driver: Chrome, logger = logging.getLogger('main')): @classmethod def perform(cls): - if cls.clock.delta() > parameters['timeout']: raise cls - sleep(0.2); return True + if cls.clock.delta() > parameters['timeout']: + raise cls + sleep(0.2) + return True class Acknowledge(Action): @classmethod