首页 > 编程语言 > 详细

Python 定时器 timer

时间:2015-09-07 15:39:07      阅读:227      评论:0      收藏:0      [点我收藏+]
#!/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()


Python 定时器 timer

原文:http://my.oschina.net/u/2250952/blog/502327

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!