On Windows sleep does provide millisecond resolution for the interval. The catch is that the standard resolution in which you can measure the time elapsed (in the sleep and in the renderer) is only 10ms (or 15.625ms on some systems).
This means you either use JNI, the new hidden timer in 1.4.2, or have a thread with sleep(1) and a counter in a tight loop to provide extra time measurement resolution.
Also watch out for this (look at the related bug as well)
http://developer.java.sun.com/developer/bugParade/bugs/4500388.html
For information, see the following RFE:
http://developer.java.sun.com/developer/bugParade/bugs/4478186.html
‘Add a high-resolution timer to the API’.
Actually I’ve been talking to a variety of developers and it seems that there are variety of high resolution timers scattered in optional classes/APIs like Java3D and the Apple Sound utility classes.
At the moment I don’t want to use native code for a timer because I don’t want to factor in more native code right now (harder to refactor out when everyone has 1.5) so for right now I’m going to use all of the piecepart Java APIs like the bootleg hidden stuff in 1.4.2 and the Apple timer in 1.4.1 (since there is no 1.4.2 yet).