render stats: reduce avg

Otherwise fps are building up when joining?
This commit is contained in:
Moritz Zwerger 2025-02-03 22:21:27 +01:00
parent 8dca129517
commit 7229f9c06e
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2024 Moritz Zwerger
* Copyright (C) 2020-2025 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*

View File

@ -26,8 +26,8 @@ class ExperimentalRenderStats : AbstractRenderStats {
private val baseMultiplier = random.nextFloat(1.0f, 1.5f)
private val baseJitter = random.nextInt(0, 20)
override val avgFrameTime = LongAverage(3.seconds)
override val avgDrawTime = LongAverage(3.seconds)
override val avgFrameTime = LongAverage(1.seconds)
override val avgDrawTime = LongAverage(1.seconds)
private var lastSmoothFPSCalculationTime = 0L
override var smoothAvgFPS: Double = 0.0

View File

@ -18,8 +18,8 @@ import de.bixilon.kutil.time.TimeUtil.millis
import kotlin.time.Duration.Companion.seconds
class RenderStats : AbstractRenderStats {
override val avgDrawTime = LongAverage(3.seconds, Long.MAX_VALUE)
override val avgFrameTime = LongAverage(3.seconds, Long.MAX_VALUE)
override val avgDrawTime = LongAverage(1.seconds, Long.MAX_VALUE)
override val avgFrameTime = LongAverage(1.seconds, Long.MAX_VALUE)
override var totalFrames: Long = 0L
private set