How to restrict user to not to give input after a certain period? | SoloLearn: Learn to code for FREE!

0

How to restrict user to not to give input after a certain period?

i want to build a quiz in which the user is given limited time for input and once the time is over the program move to the next question

1/27/2017 5:23:01 AM

nitesh

3 Answers

New Answer

+6

I had the same question of doing this in C++. Multi-threading will do the job, but if that is unfamiliar, the alternate trick is to get system time before answering quiz, store system time into a variable and then get system time after user answers the quiz. Compare the two and disqualify he user if time is more than n seconds.

0

but what i really want to skip that unnecessary input part

0

try sleep function..