跳转到内容

Ko Samet

  • Home
  • Blockchain
  • GOLANG
  • Javascript
  • English
  • Links

python定时间隔时间执行

  • 发表于: 2019年12月18日 2019年12月18日
  • 分类: Python
import time
def sleeptime(hour,min,sec):
    return hour*3600 + min*60 + sec
second = sleeptime(0,0,20)
while 1==1:
    time.sleep(second)
    print 'do action'
#这是隔20秒执行一次

文章导航

前一页 上一篇: 比特币期货套保的教程
后一页 下一篇: python3及pip3安装

admin

1014RSS订阅
  • Java spring Bean
  • nginx 配置
  • gitea搭建
  • git push 简化
  • 关闭开盖自动开机功能

© 2025  Ko Samet. 由 WordPress 强力驱动. WordStar, 主题由Linesh Jose提供