Python time library
How can I set the timer for my game(quize). Actually I want to set 5 seconds for user to tell me the input and if user didn't send an input during 5 seconds I will print gameover. And also if user send me the input in 5 seconds I will print(ok) if the answer is correct. My problem now is that I can't make the timer to check if the user enters the input in less than 5 seconds. it would always check it after get input or before that and the rule is that using time library!!