C++: How to sleep for a nanosecond? [duplicate]
You should also notice that there is the scheduler, which probably allows no sleeps that are shorter than an timeslice (somewhat around 4 ms - 10 ms, depending on your windows and machine). sleeping less than that is not possible on
Here are some (quite old) research on that issue windows.
This article suggests using Win32 timeBeginPeriod()
to achieve that.