From 125a490aca9d9e92e9580a41c89dc3e016e3e654 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Wed, 3 Jun 2020 00:14:30 +0800 Subject: [PATCH] Fix: Timer for ui_click --- module/base/timer.py | 3 +++ module/ui/ui.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/base/timer.py b/module/base/timer.py index 66ba8fa00..ce3b6e2aa 100644 --- a/module/base/timer.py +++ b/module/base/timer.py @@ -84,6 +84,9 @@ class Timer: pass else: confirm_timer.reset() + + Also, It's a good idea to set `count`, to make alas run more stable on slow computers. + Expected speed is 0.35 second / screenshot. """ self.limit = limit self.count = count diff --git a/module/ui/ui.py b/module/ui/ui.py index 4c39c73f4..028a6db61 100644 --- a/module/ui/ui.py +++ b/module/ui/ui.py @@ -30,7 +30,7 @@ class UI(ModuleBase): logger.hr('UI click') if appear_button is None: appear_button = click_button - click_timer = Timer(retry_wait) + click_timer = Timer(retry_wait, count=6) while 1: if skip_first_screenshot: skip_first_screenshot = False