Sleeping for milliseconds on Windows, Linux, Solaris, HP-UX, IBM AIX, Vxworks, Wind River Linux?
I have to write a C program which has to sleep for milliseconds, which has to run on various platforms like Windows, Linux, Solaris, HP-UX, IBM AIX, Vxworks, and Windriver Linux On Windows , the Sleep system call will work on milliseconds only. On Linux , sleep will work on seconds; usleep will perform on microseconds and it's available on Solaris also. In Vxworks , I hope I can implement using taskDelay and sysClkRateSet . How can I achieve this millisecond sleep on HP-UX, IBM AIX and Wind River Linux? Propably a wrapper using platform specific #define s will do: #if defined(WIN32) #include