title: nanosleep not working with multiple threads
body: <p>I have a problem with the nanosleep() function.</p>
  
  <p>In a test project, it works as expected.<br>
  In the real project, it does not: it is like if the sleeping time was zero.  </p>
  
  <p>As far as I can see, the biggest difference between the test and the real project is the number of threads: one in the test, two in the real one.  </p>
  
  <p>Could this be the reason?  </p>
  
  <p>If I put the nanosleep call in the code run by one thread, shouldn't that thread pause?</p>
  
  <p>Thank you.</p>