from threading import Timer import time timer_interval=10 def delayrun(): print ‘running...‘ t=Timer(timer_interval,delayrun) t.start() while True: time.sleep(1) print ‘main running......‘
Python timer定时器
原文:http://www.cnblogs.com/wood9291/p/5107384.html