sleep function

Jeff Bauer jbauer at rubic.com
Tue Aug 29 22:03:39 EDT 2000


Arnaldo Riquelme wrote:
> Does python has a function similar to  sleep() in perl?
> If so what is it? How do I make a function to execute 
> every (5,15,10) minutes ?


>>> from time import sleep
>>> for t in range(3):       
...     sleep(300)
...     print 5*(t+1), "minutes have elapsed ..."
... 

5 minutes have elapsed ...
10 minutes have elapsed ...
15 minutes have elapsed ...

---
Jeff Bauer
Rubicon Research




More information about the Python-list mailing list