I'm eager to know how you generally would timeout if a user is idle in C#. There are some "Q/A"s about how to timeout after a certain time, but that is not what I ask. Assume there is a console.readline() waiting for a user to put some characters. I want to timeout if user is not entering any character within 5 seconds. But if the user types a random character e.g. "D", then waits 2 seconds, enters "A" waits 3 seconds, and go on like that the app should not timeout since the user is actively interacting with the program within less than 5 seconds. I hope my question is clear enough, if not feel free to ask for more clarification.
The other question here is not about timing out when user is idle, it just simply times out after some seconds, my question is about detecting idle user. That is when user is not actively interacting with the console of my application!