So am trying to write a program that 'allows' the user to enter data for x-seconds, stopping the timer if this happens, and doing something else if this is not the case...
The only problem is, im pretty confused about the timer in c++
anyone could explain things up a bit, please?
http://linux.die.net/man/2/poll If you are on some ancient system that does not supply poll(), let me know and I'll give you a version that uses select().
Use the function to check for keypresses. If it returns true, then you know you have input to read. Otherwise your timeout has expired.