首页 > 其他 > 详细

利用 threading.Timer 启动方法

时间:2019-09-24 17:21:57      阅读:111      评论:0      收藏:0      [点我收藏+]
 1 import threading as thd
 2 import time
 3 
 4 
 5 def fn():
 6     print(time.time())
 7     thd.Timer(1, fn).start()
 8 
 9 
10 fn()

利用threading.Timer 间隔1s 启动fn()方法一次 等待过程中主进程不中断

利用 threading.Timer 启动方法

原文:https://www.cnblogs.com/ltn26/p/11579428.html

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