Wednesday, May 23, 2007

Quantifying The Accuracy Of Sleep - The Code Project - System

Quantifying The Accuracy Of Sleep - The Code Project - System: "First, while Sleep(0) performed mostly as expected, there were two notable exceptions (described below). For the most part, Sleep(0) indeed relinquished the remainder of the thread's time slice to another thread. Where there were no other threads, Sleep(0) returned after an extremely short time interval, typically 10-15 microSeconds. Where there were other threads, Sleep(0) didn't return for a much longer period, typically around 100-150 milliseconds, reflecting the fact that Windows didn't give the thread a new time slice for a while. "

No comments: