diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 94f1b15..a4afd47 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -264,8 +264,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
264 | float targetframetime = 1100.0f / (float)m_nominalReportedFps; | 264 | float targetframetime = 1100.0f / (float)m_nominalReportedFps; |
265 | 265 | ||
266 | float sparetime; | 266 | float sparetime; |
267 | if (TotalFrameTime > targetframetime ) | 267 | float sleeptime; |
268 | if (TotalFrameTime > targetframetime) | ||
269 | { | ||
268 | sparetime = 0; | 270 | sparetime = 0; |
271 | sleeptime = 0; | ||
272 | } | ||
269 | else | 273 | else |
270 | { | 274 | { |
271 | sparetime = m_frameMS - m_physicsMS - m_agentMS; | 275 | sparetime = m_frameMS - m_physicsMS - m_agentMS; |
@@ -274,6 +278,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
274 | sparetime = 0; | 278 | sparetime = 0; |
275 | else if (sparetime > TotalFrameTime) | 279 | else if (sparetime > TotalFrameTime) |
276 | sparetime = TotalFrameTime; | 280 | sparetime = TotalFrameTime; |
281 | sleeptime = m_sleeptimeMS * perframe; | ||
277 | } | 282 | } |
278 | 283 | ||
279 | // other MS is actually simulation time | 284 | // other MS is actually simulation time |
@@ -363,7 +368,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
363 | sb[21].StatValue = sparetime; | 368 | sb[21].StatValue = sparetime; |
364 | 369 | ||
365 | sb[22].StatID = (uint)Stats.SimSleepTime; | 370 | sb[22].StatID = (uint)Stats.SimSleepTime; |
366 | sb[22].StatValue = m_sleeptimeMS * perframe; | 371 | sb[22].StatValue = sleeptime; |
367 | 372 | ||
368 | for (int i = 0; i < 23; i++) | 373 | for (int i = 0; i < 23; i++) |
369 | { | 374 | { |