python Python setInterval来自http://stackoverflow.com/questions/2697039/python-equivalent-of-setinterv

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python Python setInterval来自http://stackoverflow.com/questions/2697039/python-equivalent-of-setinterv相关的知识,希望对你有一定的参考价值。

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

以上是关于python Python setInterval来自http://stackoverflow.com/questions/2697039/python-equivalent-of-setinterv的主要内容,如果未能解决你的问题,请参考以下文章