do something in time interval

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Oct 9 00:37:40 EDT 2008


In message <mailman.2134.1223400793.3487.python-list at python.org>, Hendrik
van Rooyen wrote:

>     import time
>     while True:
>         end_time = time.time() + 5
>         while time.time() < end_time:
>             do_the_in_between_stuff()
>         do_the_every_five_second_stuff()

Maybe I'm dense, but ... where do you stop the busy-waiting?



More information about the Python-list mailing list