fix time
This commit is contained in:
parent
6aac7d2c4d
commit
3300f55fec
|
|
@ -226,7 +226,7 @@ class Test(Widget):
|
|||
def refresh_time(self, init=False):
|
||||
if init and not hasattr(self, 'time_timer'):
|
||||
self.time_timer = QTimer()
|
||||
self.time_timer.setSingleShot(True)
|
||||
self.time_timer.setSingleShot(False)
|
||||
self.time_timer.timeout.connect(self.refresh_time)
|
||||
|
||||
t = datetime.now()
|
||||
|
|
@ -236,7 +236,7 @@ class Test(Widget):
|
|||
|
||||
# Always restart the timer, ensuring intervals are set correctly
|
||||
if hasattr(self, 'time_timer'): # Safeguard for uninitialized timer
|
||||
self.time_timer.start((60 - t.second) * 1000)
|
||||
self.time_timer.start(30000)
|
||||
|
||||
def select_step_img(self, step, suffix=None):
|
||||
img_path = "./src/ui/imgs"
|
||||
|
|
@ -289,6 +289,12 @@ class Test(Widget):
|
|||
self.autotest_timer.start(self.autotest_period)
|
||||
reason = "boot"
|
||||
|
||||
if not hasattr(self, "refresh_timer"):
|
||||
self.refresh_timer = QTimer()
|
||||
self.refresh_timer.setSingleShot(False)
|
||||
self.refresh_timer.timeout.connect(self.refresh_time)
|
||||
self.refresh_timer.start(30000)
|
||||
|
||||
if self.config["autotest_leak"]["enabled"] == "true":
|
||||
self.autotest_request = reason
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user