best way to create a timer

subhabrata.iisc at subhabrata.iisc at
Fri Jun 13 09:09:09 CEST 2008

You can think of doing with import time module and time.sleep(n) but
you have to calculate n in seconds.

Alexnb wrote:
> I am wondering what is the best way to create a timer, like an alarm, once it
> reaches a time, it triggers an event. I have a way of doing this but it
> seems like it isn't good at all. If it helps at all I am using a Tkinter,
> but that probably doesn't mean much. The way I was doing it was using a
> while loop, and just saying while current time is not = to trigger time, do
> nothing, and when it is, do event.
> --
> View this message in context:
> Sent from the Python - python-list mailing list archive at

More information about the Python-list mailing list