I have code that dequeues data from a queue in a while
loop which runs until the queue is empty. Sometimes when
the queue is big this affects the performance of machine -
the function is running at DISPATCH_LEVEL. I have tried
using KeQueryInterruptTime (logging start time and then
check time in the loop) to time the operation with the
intention of timing out after 1 milli-second or so.
However, I've found that unless at least 16 milli seconds
expires my start time and check time are the same!!! The
only time that KeQueryInterruptTime() returns a new time
is when at least 16 milli seconds has passed! Am I doing
something wrong? Is this the best KeQueryInterruptTime()
can do?