📜  相当于 setInterval python 代码示例

📅  最后修改于: 2022-03-11 14:47:11.233000             🧑  作者: Mango

代码示例1
import threading

def set_interval(func, sec):
    def func_wrapper():
        set_interval(func, sec)
        func()
    t = threading.Timer(sec, func_wrapper)
    t.start()
    return t