Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 09:10:02 am
Xith3D CommunityGeneral CategoryGeneral Discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Interesting article about currentTimeMillis() in Java
Pages: [1]
Print
Author Topic: Interesting article about currentTimeMillis() in Java  (Read 817 times)
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« on: 27. October 2008, 02:54:37 pm »

I didn't know if this would affect us or not, but I found it interesting.  Overall, I'd think in cases we're calling currentTimeMillis() we need the actual time.  Still an interesting idea for speedup...

http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 27. October 2008, 04:41:10 pm »

Interesting article. But in xith we need much more accuracy than the author of this article does. But this shouldn't be a problem, since time is polled only once per frame in xith and this time is passed as an argument to any method, that needs the current game time and which uses xith's Updatable, ScheduledOperation, etc. schemes. Additionally xith doesn't use System.currentTimeMillis(), but System.nanoTime(), since currentTimeMillis() provides insufficient accuracy and is known to be lagging on some OSes like Windows.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic