import time

s = time.time() + 30
running = True
while running:
if time.time() == s:
print 'yes'
running = False

This stops the loop after 30s but the program uses about 12% cpu. What
would be a more efficient way to do this? (p.s. i'm on python 2.7.3)

Saad
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to