I have a time-sensitive request, let's call it query_response
.
How to write the program so that, if query_response
take less than 2 seconds then run take_action
else run abort_action
.
def query_response():
print("Query Response")
def take_action():
print("Take Action")
def abort_action():
print("Abort Action")