I've been trying to get smooth timing for a little while, and finally got it working very smoothly (on Windows XP).
If the game loop is something like
<advance logic, render>
<sleep for 1/desired_fps minus however long the above took>
it will be fairly imprecise - I was experiencing very frequent jumps where a frame would take 2-3x longer than it's supposed to, just because the sleep() call took that much longer than expected. So Thread.sleep(5) would return after 15+ ms.
The interesting part is, if you call Thread.sleep(1) often, it greatly improves timer precision. Literally changing nothing else, and adding a new daemon thread that calls Thread.sleep(1) in an infinite loop, with no other interaction with the rest of the code, completely eliminated any jerkiness in the main game loop.
Weird, I know. What's even more interesting is that this will help even if it's done in a separate process, not just a separate thread.