mirror of
https://gitee.com/quecpython/helios-service.git
synced 2025-05-19 06:08:22 +08:00
15 lines
343 B
Python
15 lines
343 B
Python
from usr.bin.third_party.ql_interrupter import TimerInterrupter
|
|
|
|
|
|
def func(*args, **kwargs):
|
|
print("func args = {} kwargs = {}".format(args, kwargs))
|
|
|
|
|
|
# 初始化 传入回调函数, 1代表, 一直执行
|
|
# timer = TimerInterrupter(3000, func, 1)
|
|
# 此为只执行1次
|
|
timer = TimerInterrupter(3000, func, 0)
|
|
|
|
# 启动timer
|
|
timer.start()
|