doint two things at once in C
i was wandering how to write a program, that would do something (loop around) UNTIL some key is pressed, and if it is pressed, it will do something else.
for example if i wanted to write a countdown timer in C and i wish to have a 'pause' function, but i dont know how to make it to write out the time every couple of ms's and at the same time, if i press a key, to pause the timer
the functions like getchar, scanf etc wait for the user to press the key.. so the coundown timer isnt working at that time
i want something that would do this:
do something
if(key was pressed)
--do sth. else
else
do something again
|