Codility assessments vary in length but typically last between half an hour and two hours. The exact time limit is set by your test administrator and depends on the number of tasks, and is visible on the test intro page linked in the email invite. Keep in mind that once you begin the assessment, you cannot pause or stop the timer, so be sure to set aside enough time to complete the entire assessment in one sitting. Codility assessments are designed to allow plenty of time to complete all tasks without rushing, and the time it takes you to solve the tasks does not factor into automated scoring.
Please note that the time limit you see on your screen is for the whole assessment, not a single task. Once the time runs out, the code present in the IDE is submitted automatically and the assessment is ended.