diff --git a/bin/RabiClone.jar b/bin/RabiClone.jar index 5fa5a0a..c755515 100644 Binary files a/bin/RabiClone.jar and b/bin/RabiClone.jar differ diff --git a/src/sig/RabiClone.java b/src/sig/RabiClone.java index 0e5bb86..92703c4 100644 --- a/src/sig/RabiClone.java +++ b/src/sig/RabiClone.java @@ -25,10 +25,16 @@ public class RabiClone { f.setVisible(true); p.render(); + + long lastGameTime = System.nanoTime(); while (true) { + long timePassed = System.nanoTime()-lastGameTime; + lastGameTime=System.nanoTime(); + if (KeyHeld(KeyEvent.VK_UP)) { - System.out.println("Up Held: "+UPCOUNT++); + System.out.println("Up Held: "+UPCOUNT+++" (+"+(float)(timePassed/1000000f)+"ms)"); } + } } private static Boolean KeyHeld(int key) {