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