summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/angeles/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/es1/angeles/Main.java')
-rwxr-xr-xsrc/demos/es1/angeles/Main.java21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java
index d5073c7..8e988ab 100755
--- a/src/demos/es1/angeles/Main.java
+++ b/src/demos/es1/angeles/Main.java
@@ -60,6 +60,7 @@ public class Main implements MouseListener {
window.addMouseListener(this);
+ window.enablePerfLog(true);
window.setSize(width, height);
window.setFullscreen(true);
window.setVisible(true);
@@ -77,25 +78,9 @@ public class Main implements MouseListener {
System.out.println("Using: nop .. ");
}
- long startTime = System.currentTimeMillis();
- long lastTime = startTime, curTime = 0, dt0, dt1;
- int totalFrames = 0, lastFrames = 0;
-
- do {
+ while (!quit && window.getDuration() < 215000) {
window.display();
-
- totalFrames++; lastFrames++;
- curTime = System.currentTimeMillis();
- dt0 = curTime-lastTime;
- if ( (curTime-lastTime) > 5000 ) {
- dt1 = curTime-startTime;
- System.out.println(dt1/1000+"s, 5s: "+ (lastFrames*1000)/dt0 + " fps, "+
- "total: "+ (totalFrames*1000)/dt1 + " fps");
- lastTime=curTime;
- lastFrames=0;
- }
-
- } while (!quit && (curTime - startTime) < 215000);
+ }
// Shut things down cooperatively
window.close();