python do for an amount of time code example
Example 1: how to make a while loop run for 5 seconds
import time
t_end = time.time() + 60 * 15
while time.time() < t_end:
Example 2: python repet x time
for i in range(50):
print "Some thing"
import time
t_end = time.time() + 60 * 15
while time.time() < t_end:
for i in range(50):
print "Some thing"