Is it possible to place a "pause" in a C++ app? Basically, I want to execute an instruction, pause maybe 2 seconds, execute the next instruction. I know these capabilities exist in Java, how about C++?
joeCpp-
That loop is not a good idea - it causes the program to use CPU cycles, while Sleep() actually avoids that by alerting the OS that the process/thread is going to be inactive.
Also the loop is always a bad idea in a multithreading environment. Even you know exactly how many steps are executed and know exactly how much time is required for one single step, in a multithreading environment you'll know never how much time will take all steps. John Fill
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.