Python3 threading Timer 用法-新乡seo|网站优化,网站建设_微信公众号:zeropython—昊天博客

Timer 就是一个定时器,比如说在10s执行 t()

[code]
# -*- coding: utf-8 -*-
__author__ = 'songhao'
from threading import Timer, Thread

def t():
print("t")

for x in range(10):
tr = Timer(10, t)
tr.start()

Timer 源码: