run for loop for certain amount of time code example
Example: how to make a while loop run for 5 seconds
import time
t_end = time.time() + 60 * 15
while time.time() < t_end:
import time
t_end = time.time() + 60 * 15
while time.time() < t_end: