Re: [Dev-C++] sleep() for Windows XP
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: matheus r. <mfr...@gm...> - 2007-07-23 16:41:56
|
Usually when I am in such a situation I make a wrapper function:
namespace::mysleep(int t)){
#if WIN32
Sleep(t);
#else
sleep(t);
#endif
}
You can also do that through defines to avoid code change.
Im not sure theres a portable version of sleep, dont think its part of
standard libc. I could be wrong though.
> Using GCC, I developed some small apps under Linux, now I am trying to port
> this apps to MSWinXP, but there are some Unix functions that are not
> available under MS, sleep() is one of them. Does anyone know where I can
> find a source code for such service, so that it is a portable sleep()
> function?
|