def fun_timer(self):
globals.T += 1
print(globals.T)
global timer
timer = threading.Timer(0.2, self.fun_timer)
timer.start()
def on_pushButton_clicked(self):
timer = threading.Timer(0.2, self.fun_timer)
timer.start()
python使用threading.Timer实现线程循环任务定时器
最新推荐文章于 2022-01-11 10:42:31 发布