aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-05-12 17:58:36 +0100
committerUbitUmarov2012-05-12 17:58:36 +0100
commit9b7023a159c69d599248783d88ba96a328a584f2 (patch)
treea105f6c2b5dfcf44634d02df9e21f5234cde1660
parentªTEST MESS* reduce animation packets send. Added onchangeanim event with par... (diff)
downloadopensim-SC-9b7023a159c69d599248783d88ba96a328a584f2.zip
opensim-SC-9b7023a159c69d599248783d88ba96a328a584f2.tar.gz
opensim-SC-9b7023a159c69d599248783d88ba96a328a584f2.tar.bz2
opensim-SC-9b7023a159c69d599248783d88ba96a328a584f2.tar.xz
display a sleep time of zero if forced spare time to zero, when sim fps is lower than desired, for better display coerence.
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs9
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 {