Java menghitung waktu berlalu

deltaTime = (System.nanoTime() - lastDeltaTime) / 1_000_000_000.0D;
lastDeltaTime = System.nanoTime();
Bredo