hello,
java has a nice bundle of classes to schedule execution. namely java.util.Timer and java.util.TimerTask. unfortunately they work with currentTimeMillis() which is just not accurate enough for realtime games.
so i was trying to replace currentTimeMillis() with nanoTime(), but now my schedulded tasks are executed once and then never again.
i was already looking through relevant code if there are any precision errors like a division or a conversion from milliseconds to seconds which would need adaption of course. but i couldnt find anything.
does anyone know why java.util.Timer does not work anymore when replacing millis with nanos?
thanks!