I want to accurately measure time of a Python code, that crashes. I can use the time
command for unix, but that isn't as precise as time.time
module in Python
start = time.time()
assert(1 < 0)
print(time.time() - start)
The code -- above -- definitely doesn't work if executed as Python code (although inside a Python interpreter it works, but that isn't desirable) , I am asking if there is a work-around ?