From aba9a9e0027251d345550ee177306390d575cdb1 Mon Sep 17 00:00:00 2001 From: mmyers Date: Tue, 18 Jun 2024 12:29:10 -0500 Subject: [PATCH] Remove FPS counter --- EU3_Scenario_Editor/src/editor/MapPanel.java | 30 +------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/EU3_Scenario_Editor/src/editor/MapPanel.java b/EU3_Scenario_Editor/src/editor/MapPanel.java index 16ec4bf..fb833a2 100644 --- a/EU3_Scenario_Editor/src/editor/MapPanel.java +++ b/EU3_Scenario_Editor/src/editor/MapPanel.java @@ -135,29 +135,7 @@ private void initComponents() { // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables // - - private double dirtyFPS; - private double cleanFPS; - - public void checkFPS() { - long startTime = System.nanoTime(); - for (int i = 0; i < 20; i++) { - isDirty = true; - paint(getGraphics()); - } - long middleTime = System.nanoTime(); - for (int i = 0; i < 100; i++) { - paint(getGraphics()); - } - long endTime = System.nanoTime(); - - long averageDirtyFrame = (middleTime - startTime) / 20; - long averageCleanFrame = (endTime - middleTime) / 100; - dirtyFPS = 1000000000.0 / averageDirtyFrame; - cleanFPS = 1000000000.0 / averageCleanFrame; - repaint(); - } - + @Override protected void paintComponent(final Graphics g) { if (scaledMapImage == null) { @@ -171,12 +149,6 @@ protected void paintComponent(final Graphics g) { for (java.util.Map.Entry override : overrides.entrySet()) { paintProvince((Graphics2D) g, override.getKey(), override.getValue()); } - - g.setColor(Color.WHITE); - if (dirtyFPS > 0) - g.drawString(String.format("Dirty FPS: %.1f", dirtyFPS), 0, 10); - if (cleanFPS > 0) - g.drawString(String.format("Clean FPS: %.1f", cleanFPS), 0, 30); } }