I’m meant to be doing other stuff thats due very soon but I can’t help myself but waste… i mean spend time here. I’m doing an all-nighter at the moment & I’m in that bad patch at around 3:15 AM. Please make this easier for me - there aren’t enough new posts to read :’(, but with your help…
add a little interesting / useful / tricky java tip. Here’s two I can think of:
[b]1) Thread.sleep(int millis) is very inaccurate & usually sleeps for much longer than whatever you ask. On windows it seems that the minimum sleep is 20ms.
- System.currentTimeMillis() has between 35-50ms granularity on windows (but 1ms on linux & mac, apparently). System.nanoTime() gives at least millisecond accuracy.[/b]
Also, refute any inaccuracies at will (but that went without saying :))
My game engine is based on Thread.sleep() and it’s working fine.
Interesting points bleb.