diff options
author | UbitUmarov | 2012-04-24 03:38:13 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-24 03:38:13 +0100 |
commit | f1d6b3e710787f89b76bc85aff83feac1d22dd0b (patch) | |
tree | f04e5bba35cfdb7515ca9c6295c1019db1e46a2a | |
parent | *testing* changed stats time reports to be per reported frame and not acumul... (diff) | |
download | opensim-SC_OLD-f1d6b3e710787f89b76bc85aff83feac1d22dd0b.zip opensim-SC_OLD-f1d6b3e710787f89b76bc85aff83feac1d22dd0b.tar.gz opensim-SC_OLD-f1d6b3e710787f89b76bc85aff83feac1d22dd0b.tar.bz2 opensim-SC_OLD-f1d6b3e710787f89b76bc85aff83feac1d22dd0b.tar.xz |
some reduction on time resolution efects on spare time report
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 31f5b88..2d73380 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -267,21 +267,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
267 | float factor = 1 / statsUpdateFactor; | 267 | float factor = 1 / statsUpdateFactor; |
268 | if (reportedFPS <= 0) | 268 | if (reportedFPS <= 0) |
269 | reportedFPS = 1; | 269 | reportedFPS = 1; |
270 | float TotalFrameTime = 1000.0f * statsUpdateFactor / (float)reportedFPS; | 270 | |
271 | float perframe = 1.0f / (float)reportedFPS; | 271 | float perframe = 1.0f / (float)reportedFPS; |
272 | 272 | ||
273 | float TotalFrameTime = 1000.0f * statsUpdateFactor * perframe; | ||
274 | |||
275 | float targetframetime = 1100.0f / (float)m_nominalReportedFps; | ||
276 | |||
273 | float sparetime; | 277 | float sparetime; |
274 | if (m_nominalReportedFps <= 0) | 278 | if (TotalFrameTime > targetframetime ) |
275 | sparetime = 0; | 279 | sparetime = 0; |
276 | else | 280 | else |
277 | { | 281 | { |
278 | sparetime = 1000.0f / (float)m_nominalReportedFps; | 282 | sparetime = TotalFrameTime - m_frameMS * perframe; |
279 | sparetime -= m_frameMS * perframe; | ||
280 | if (sparetime < 0) | 283 | if (sparetime < 0) |
281 | sparetime = 0; | 284 | sparetime = 0; |
282 | else if (sparetime > TotalFrameTime) | 285 | else if (sparetime > TotalFrameTime) |
283 | sparetime = TotalFrameTime; | 286 | sparetime = TotalFrameTime; |
284 | } | 287 | } |
288 | |||
285 | 289 | ||
286 | for (int i = 0; i < 23; i++) | 290 | for (int i = 0; i < 23; i++) |
287 | { | 291 | { |