From: LRN <lr...@gm...> - 2011-06-21 11:11:15
|
On 21.06.2011 14:40, Tor Lillqvist wrote: >> boost::this_thread::sleep() - probably is best >>>> i586-mingw32msvc-gcc -o hello.exe hello.c > but if he is using C, not C++, suggesting boost is pointless. Anyway, > the Sleep() in Win32 works fine, you just have to know that the > parameter is milliseconds, not seconds. So using boost for this even > in C++ code would be slight overkill if you aren't otherwise using > boost. > Actually, the "correct" way of sleeping is WaitForSingleObject (), as it has some properties of sleep()/usleep() that Sleep() does not have, such as interruption. |