   Java System.currenttimemillis is running at 2x the speed it is supposed to.
  Hello.  I'm having a bit of a problem.  I'm working in Java, and I need an accurate FPS.  However, for some reason, System.currentTimeMillis() is not being accurate at all.It actually changes from being accurate (tested for 60 seconds with a stopwatch, perfect accuracy) to being just over 2x the stopwatch speed (tested for 60 seconds when this was happening, the system timer said that 124 seconds had elapsed)I'm just displaying System.currentTimeMillis() in my java applet (It is the beginning of an RTS)What could be causing this?  Doesn't make any sense to me.  Is my computer's clock messed up?  The date and time are accurate on the clock on my taskbar..Thanks for your help,AdamJust a little more information for you..It is dependant on the run of the applet.  If I start the applet, and the clock is running fast, it will stay running fast.  If I run the applet again, and it starts at the correct speed, it will stay at the correct speed.Finally, if I run the applet, and it starts fast, and I start another copy of it, there is about a 50% chance that the 1st applet slows down to the correct speed..  It is incredibly odd, I have no clue what is happening.   
  Just bumping.. No replies, its on the 2nd page, and I haven't been able to figure it out yet.If you suspect anything, please let me know.Thanks for your help,Adam   ;  Odd. What JRE are you using?   ;  Not really sure what the problem is. It could be just the fact that currentTimeMillis() isn't completely accurate. But going from perfectly accurate to double speed in separate runs seems like a bigger problem than that. You might find this link useful:http://fivedots.coe.psu.ac.th/~ad/jg/ch1/index.htmlThe author builds an animation framework that checks for variations in frame rate and corrects it to keep the rate relatively constant. Good luck!   ;  I'm using jdk 1.5.0.  I either use the appletviewer from the same, but I've tried my firefox browser, which I think uses the same, java 1.5.0Thanks for the link, I'm looking at it now.Thanks for your help so far,Adam   