implementing a timer?

Werner Schiendl ws-news at
Tue Dec 18 05:14:12 EST 2001

Hi Peter,

you can use the sleep function from the time module, for example:

>>> import time
>>> i = 0
>>> while i < 10:
...  print i
...  time.sleep(10)
...  i+=1

This prints the numbers 0 to 9 with 10 seconds delay after each one. To get
minutes, multiply by 60. You can also specify fractional values to get
shorter periods that a second.


"waalp" <waalp at> wrote in message
news:9vn0gv$ll6$1 at
> I'm trying to make a script that will check if i have mail every let's say
> 10 minutes.So i tought let's use something like a timer. But i can't find
> any documentation on how to implement something like this.
> I'm a beginner so it could be that i haven't looked in the right places.
> Could somebody please help?
> Thanks,
> Peter

More information about the Python-list mailing list