diff --git a/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java b/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java index 768821e30..e73d2f280 100644 --- a/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java +++ b/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java @@ -203,7 +203,7 @@ public final class Renderer { bgfx_dbg_text_printf(0, 0, 0x0f, "Time: " + NumberUtil.padNumbers(LocalTime.now().getHour(), 2) + ":" + NumberUtil.padNumbers(LocalTime.now().getMinute(), 2) + ":" + NumberUtil.padNumbers(LocalTime.now().getSecond(), 2)); bgfx_dbg_text_printf(0, 1, 0x0f, "Frames: " + Renderer.getFrameCount()); bgfx_dbg_text_printf(0, 2, 0x0f, "Frames/s: " + Renderer.getFramesPerSecond()); - bgfx_dbg_text_printf(0, 3, 0x0f, "Delta: " + Renderer.getDeltaTime()); + bgfx_dbg_text_printf(0, 3, 0x0f, "Delta: " + Renderer.getDeltaTime() + "s"); bgfx_dbg_text_printf(0, 4, 0x0f, "V-Sync mode: " + RenderingSubsystemConfiguration.getInstance().getVsyncMode().name()); bgfx_dbg_text_printf(0, 6, 0x0f, "Rendering time:"); for (String item : lastFrameTime.keySet()) { @@ -366,7 +366,7 @@ public final class Renderer { // Perform per-second operations if (System.currentTimeMillis() >= timesPSO) { // Calculate FPS count - framesPerSecond = 1 / deltaTime; + framesPerSecond = 1 / NumberUtil.calculateMeanDouble(deltaTimes); // Log frame count if (RenderingSubsystemConfiguration.getInstance().isDebugFrames())