I am learning the multi-threading and timer in C# now. But it seems I can't find a good solution.
For example, I would like to see how many addition problems that I can solve within 1 min. I would like my program to have
- A digital clock to count for 60 seconds in the top of my Console.
- Print a math problem in the middle of my console wait for my input.
- When 60 seconds is done, stop the math problem challenges immediately (most of time, it is still waiting for my input, but we will stop it immediately).
- Count how many correct problems that I have solved.
Two challenges of the program now.
a) how can we make sure the print time and math problem do not mess up.
b) how can we stop the math challenges part immediately after time is up