Velikost videa: 1280 X 720853 X 480640 X 360
Zobrazit ovladače přehrávání
Automatické přehrávání
Přehrát
Código Run: this.requestFocus(); long lastTime = System.nanoTime(); double amountOfTicks = 60.0; double ns = 1000000000 / amountOfTicks; double delta = 0; long timer = System.currentTimeMillis(); int frames = 0; while (running) { try { long now = System.nanoTime(); delta += (now - lastTime) / ns; lastTime = now; while (delta >= 1) { delta--; } if (running) paintComponent(); frames++; if (System.currentTimeMillis() - timer > 1000) { timer += 1000; System.out.println("FPS: " + frames); frames = 0; } } catch (Exception e) { System.out.println("Error: " + e.toString()); } }
OMG That’s amazing dude!
Muy buen video:)
Hola cómo podría hablar al privado con usted 🙏😇
Con que teclas se importa
Ctrl + shift + O En eclipse
Código Run:
this.requestFocus();
long lastTime = System.nanoTime();
double amountOfTicks = 60.0;
double ns = 1000000000 / amountOfTicks;
double delta = 0;
long timer = System.currentTimeMillis();
int frames = 0;
while (running) {
try {
long now = System.nanoTime();
delta += (now - lastTime) / ns;
lastTime = now;
while (delta >= 1) {
delta--;
}
if (running)
paintComponent();
frames++;
if (System.currentTimeMillis() - timer > 1000) {
timer += 1000;
System.out.println("FPS: " + frames);
frames = 0;
}
} catch (Exception e) {
System.out.println("Error: " + e.toString());
}
}
OMG That’s amazing dude!
Muy buen video:)
Hola cómo podría hablar al privado con usted 🙏😇
Con que teclas se importa
Ctrl + shift + O En eclipse