Hello how do you do. Today's question has to do with the time module. I want to add a timer to my gui.
As I was messing around with it I found a way to measure time... but I'm positive there is a more elegant way to deal with this than what I've thrown together. def thing(): start = time.time() while 1: now = time.time() if now == start + 10.0: print "times up" How are timers usually implemented? By the way, I'm not really asking as much about the how (because I could throw something together that will serve my purpose), I'm asking more about conventions, like is there a standard way people implement timers, like does python come with one built in? Does every programmer who wants a timer write a different one? ---- What is it about you... that intrigues me so?
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor