Create a delay without using Sleep
Its almost exam time :( and my teacher would like us to learn how to create a delay in our programs without using the Sleep function in the windows.h library. He said that we might do somthing like create a loop where there is a counter that will count to a very high number or somthing like that. I tried somthing like this:
There seemed to be no diference between the two. Any suggestions? Thanks
if (a < 10000)
elseif (a >100000)
//some other code
BTW: My teacher said that sleep isn't a good function in most cases because it makes the system inactive for that time and no input will do anything, a function that can still retrieve input while pausing would be helpfull aswell.
Exam in 2 days! :eek: