23decxf 发表于 2017-4-24 13:12:20

Python中sleep函数

  sleep(t): 该方法可以把当前执行进程挂起t个时间。time可是浮点数,t的单位为second.
  Example:
#!/usr/bin/python
import time
print "Start : %s" % time.ctime()
time.sleep( 5 )
print "End : %s" % time.ctime()

  结果:
  Start : Wed May  2 23:14:34 2012
End : Wed May  2 23:14:39 2012
页: [1]
查看完整版本: Python中sleep函数