Python 定时器 timer 分类: Python 2012-12-01 15:19 55人阅读 评论(0) 收藏 举报 [python] view plain copy #!/usr/bin/env python #coding=utf-8 import threading def sayhello(): print "hello world" global t #Notice: use global variable! t = threading.Timer(5.0, sayhello) t.start() t = threading.Timer(5.0, sayhello) t.start()