high resolution timer
As every1 knows, under Windows, Java uses getTickCount for retrieving the system time. Every1 also knows that under win9x the resolution of this timer is 50[ish]ms, and under WinNT its around 10ms.
For most simple Java games, 10ms would be fine, however, after W2K died on me last week, im back to developing on win9x - and the 50ms granuality is *realy* bad (effectively limiting the framerate to 20fps).
So far i've identified 2 solutions, and was wondering if any1 knew of another alternative.
solution 1 - Use the System Timer accessed through the JMF API.
the JMF class, javax.media.SystemTimeBase gives hi-resolution timing.
This is fine for development, but im fairly sure no1 else but a developer is likely to have the JMF classes installed.
solution 2 - use JNI to access the PerformanceCounter available under Win32.
This would be an ideal solution, but.... C++ is scarrrey :P
( though I have found a webpage that makes it sound incredibly simple - http://www.fawcette.com/archives/premier/mgznarch/javapro/2001/08aug01/km0108/km0108-2.asp )
so, is there a 3rd way?
also, can any1 think of a good reason why System.currentTimeMillis() is still using getTickCount >:(
perhaps Its time we all voted for an RFE....

