How to write a function to delay for given number of miliseconds?
The function will be called intensively once the app starts. So cpu usage has to be considered.
Any hints? Thanks
Printable View
How to write a function to delay for given number of miliseconds?
The function will be called intensively once the app starts. So cpu usage has to be considered.
Any hints? Thanks
Use the Sleep() function. The following two lines of code will suspend execution for 300 milliseconds.
DWORD delay = 300; // Number of milliseconds to delay
Sleep(delay);