Java calcular o tempo delta

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