Does
Thread Sleep guarantee to sleep for at least n milliseconds, we're just playing with some timers on Windows ... now we're aware of issues with the underlying resolution of the Windows timers (10-16ms) native and that sleep may come back later than asked if the JVM has other things to do but we appeared to see it come back early (uninterruped). It seems occasionally to report its slept for 486 rather than 514 (now obviously double the inaccuracy in the timing resolution (two get's_ would cover it but I wouldn't have guessed this was allowed i.e. I would have guessed they would have said at least n milliseconds but how much over OS / circumstance dependent) . Anyone any experience in this area ?
Same tests on Solaris were fine and as predicted (always slept (measured)) at least as long as requested,
Colleague's code follows ..
}
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5