I am writing a C program where I have to ask user to input under a certain time. It should ask user for input for 5 counts or so. Whether the user enters anything or not, it should halt getting the input and proceed further with the program.
I am doing this by taking the help of uscos II multitasking. I have two tasks, one to get the user input and another to keep updating counts.
I am able to use if and while statements to get user input for certain period of time, but when the time finishes it just terminates the whole program, sometimes it also gives error related to memory. It is expected since I have not implemented anything which will automatically stop getting user input after certain period of time. Is there some specific function to do this?
Thanks in advance!