I have a problem with the nanosleep() function.
In a test project, it works as expected.
In the real project, it does not: it is like if the sleeping time was zero.
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.
Could this be the reason?
If I put the nanosleep call in the code run by one thread, shouldn't that thread pause?
Thank you.