How to make thread sleep less than a millisecond on Windows

This indicates a mis-understanding of sleep functions. The parameter you pass is a minimum time for sleeping. There’s no guarantee that the thread will wake up after exactly the time specified. In fact, threads don’t “wake up” at all, but are rather chosen for execution by the OS scheduler. The scheduler might choose to wait much longer than the requested sleep duration to activate a thread, especially if another thread is still active at that moment.

Leave a Comment