I'm calling a function A(i)
in python . I want it to be terminated if it executes for more than X milliseconds. I've looked at some ways of timing out including signal.alarm()
, but they all take the time in integral seconds. I want to do something like:
signal.alarm(0.26) //time out after 0.26 seconds
How do I do this?