Change time limit into constraint