I have been writing a program that allows for client/server communication. The game sends questions to the client, and allows the user to answer the question. It repeats 10 times, then gives a final score based on the user's answers.

My question is how do I only allow 10 seconds for the user to answer the question? If the user doesn't answer, they get -250 points and the next question is asked, else, get the input and score their answer, and ask the next question.

From what I have been reading, I believe I have to use a thread? But how do I implement this so that I can achieve my goal?

Any help would be greatly appreciated!

The timer/thread is the easy part; Syncing the client/server is the hard part.