title: Sleeping for milliseconds on Windows, Linux, Solaris, HP-UX, IBM AIX, Vxworks, Wind River Linux?
body: <p>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</p>
  
  <ul>
  <li>On <a href="https://stackoverflow.com/questions/3379139/sleep-function-in-windows-using-c/3379248#3379248">Windows</a>, the <code>Sleep</code> system call will work on milliseconds only. </li>
  <li>On <a href="http://forums.devshed.com/c-programming-42/linux-version-of-sleep-need-it-in-milliseconds-126723.html" rel="noreferrer">Linux</a>, <code>sleep</code> will work on seconds; <code>usleep</code> will perform on microseconds and it's available on Solaris also.</li>
  <li>In <a href="http://www.dauniv.ac.in/downloads/EmbsysRevEd_PPTs/Chap_9Lesson10EmsysNewVxWorksSysTaskWDTISR.pdf" rel="noreferrer">Vxworks</a>, I hope I can implement using <code>taskDelay</code> and <code>sysClkRateSet</code>.</li>
  </ul>
  
  <p>How can I achieve this millisecond sleep on HP-UX, IBM AIX and Wind River Linux?</p>