implement LIMIT_TIME for limiting wall time (deadlocks)