title: Make the current thread sleep for particular time in C
body: <p>I want to know if there is anyway to make the current thread to sleep for a particular <strong>interval of time in C</strong>. I have lots of files in the project and want only one function in the file to sleep for particular time while can access other functions in the same file. Something like below i want to do -</p>
  
  <p><code>void otherfunction()</code> &lt;-- <strong><em>other programs should be able to access otherfunction() when somefunction() is sleeping.</em></strong></p>
  
  <pre><code>   void somefunction()
     {
         //sleep for 2sec.
     }
  </code></pre>