I want to build a function that will stop another function after a set time.
For example:
def start():
global bol_start
bol_start = True
timer()
if bol_start is True:
"do something until time is over"
def stop():
global bol_start
bol_start = False
sys.exit(0)
def timer():
"code for actual timer" ?
I would like to let the user define the time x how long the tool should run start(). After the time is over it should call stop().