So I'm trying to create a program that would gather user input in a certain period of time. For example, when I start the function, the timer should also start. As soon as the timer ends and the user doesn't give any input the program would jump to different function instead. If the user does give an input before the timer ends, it does another function instead. Any suggestions?
Asked
Active
Viewed 25 times
0
-
Use multithreading with one thread starting a timer and the other thread dealing with the input – Evorage Oct 11 '20 at 16:23
-
1you could have a look at this answer: https://stackoverflow.com/a/31667005/9903391 – Tschösi Oct 11 '20 at 16:24