I am trying to allow user to input something while there is time so I took a function sleep() that I found somewhere and changed it for input. Well, it doesn't work.
char sleep(clock_t wait)
{
char c;
clock_t goal;
goal = wait + clock();
while(goal > clock()) {
cin << c;
}
return c;
}
Basically I want it to allow input in a given ammount of time. What did I do wrong and what do I have to change?