
16 May
2006
16 May
'06
11:27 a.m.
Johan Nilsson wrote:
I'm not sure which clock do you mean when you say that a thread can't sleep for less than a clock tick. If you mean the CPU clock, then yes, a no-op Sleep function that returns immediately would probably consume more than one clock tick, so it is impossible to make a thread sleep for less.
I referred to the timer tick period (~10-15 ms for the NT family).
It used to be the case that you can't get better than 10ms precision on NT without calling timeBeginPeriod, but that was years ago, I think (NT 3.5, not sure about 4). I'm getting ms-precise timing (not hard realtime, obviously, but correct most of the time) on Windows XP.