定时器Timer

定时器,指定n秒后执行某操作

from threading import Timer

def hello():
    print("hello, world")

t = Timer(1, hello)
t.start()  # after 1 seconds, "hello, world" will be printed

posted on 2019-10-01 20:03  别离  阅读(117)  评论(0)    收藏  举报

导航