Skip to main content
gamedev.net
🔒 Locked

java equivalent to timeGetTime

Started by CProgrammer 6 replies 600+ views
Original Post
CProgrammer
CProgrammer
Whats the java equivalent function to timeGetTime(). I need to calculate the fps. -CProgrammer
Zipster
Zipster
System.currentTimeMillis()
CProgrammer
CProgrammer
Well i''ll just try it and see if the resolution is adequate.
-CProgrammer
__fold
__fold
I wrote a breakout-clone with a friend that used System.currentTimeMillis(). On win 98 the result was perfect on NT it lagged. We tried alot of different ways to adjust the timer in run-time but it never became perfect.
Zahlman
Zahlman
It is 15/16 ms (I think 1/64 s) on WinXP pro according to my tests. It seems to be 1 ms on most cell phones though
Zipster
Zipster
Unfortunately, the Java API is kinda skimpy on the date/time facilities. They''re either all deprecated or don''t exist.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.