Added context manager misc.timeout for limiting the runtime of the wrapped code.