I have a Python algorithm that will not terminate on its own. I'm doing some profiling on it and would like to run it with a bunch of different settings for a set amount of time, terminating it after that time has elapsed and starting the next run. How do I do this from within Python?
for c in configs:
# what do I wrap this with do terminate it after a
# set amount of time and go to next loop iteration?
runalgorithm(config)