aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie2012-04-25 19:15:40 +0100
committerMelanie2012-04-25 19:15:40 +0100
commitdb31c9fe58f381fda7ddbee79fa467713b7c9bc6 (patch)
tree716ea72a563fd837dc39ef28d07bea272764277b /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' into careminster (diff)
parentset PIDHoverTau and not PIDTau since all physics need that (diff)
downloadopensim-SC-db31c9fe58f381fda7ddbee79fa467713b7c9bc6.zip
opensim-SC-db31c9fe58f381fda7ddbee79fa467713b7c9bc6.tar.gz
opensim-SC-db31c9fe58f381fda7ddbee79fa467713b7c9bc6.tar.bz2
opensim-SC-db31c9fe58f381fda7ddbee79fa467713b7c9bc6.tar.xz
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 85b1242..515332f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1386,10 +1386,12 @@ namespace OpenSim.Region.Framework.Scenes
1386 int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS; 1386 int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS;
1387 int previousFrameTick; 1387 int previousFrameTick;
1388 int maintc; 1388 int maintc;
1389 int sleepMS;
1390 int framestart;
1389 1391
1390 while (!m_shuttingDown && (endFrame == null || Frame < endFrame)) 1392 while (!m_shuttingDown && (endFrame == null || Frame < endFrame))
1391 { 1393 {
1392 maintc = Util.EnvironmentTickCount(); 1394 framestart = Util.EnvironmentTickCount();
1393 ++Frame; 1395 ++Frame;
1394 1396
1395// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName); 1397// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
@@ -1476,7 +1478,7 @@ namespace OpenSim.Region.Framework.Scenes
1476 // landMS = Util.EnvironmentTickCountSubtract(ldMS); 1478 // landMS = Util.EnvironmentTickCountSubtract(ldMS);
1477 //} 1479 //}
1478 1480
1479 frameMS = Util.EnvironmentTickCountSubtract(maintc); 1481 // frameMS = Util.EnvironmentTickCountSubtract(maintc);
1480 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; 1482 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
1481 1483
1482 // if (Frame%m_update_avatars == 0) 1484 // if (Frame%m_update_avatars == 0)
@@ -1491,7 +1493,7 @@ namespace OpenSim.Region.Framework.Scenes
1491 1493
1492 // frameMS currently records work frame times, not total frame times (work + any required sleep to 1494 // frameMS currently records work frame times, not total frame times (work + any required sleep to
1493 // reach min frame time. 1495 // reach min frame time.
1494 StatsReporter.addFrameMS(frameMS); 1496 // StatsReporter.addFrameMS(frameMS);
1495 1497
1496 StatsReporter.addAgentMS(agentMS); 1498 StatsReporter.addAgentMS(agentMS);
1497 StatsReporter.addPhysicsMS(physicsMS + physicsMS2); 1499 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
@@ -1548,14 +1550,22 @@ namespace OpenSim.Region.Framework.Scenes
1548 1550
1549 previousFrameTick = m_lastFrameTick; 1551 previousFrameTick = m_lastFrameTick;
1550 m_lastFrameTick = Util.EnvironmentTickCount(); 1552 m_lastFrameTick = Util.EnvironmentTickCount();
1551 maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, maintc); 1553 maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, framestart);
1552 maintc = (int)(MinFrameTime * 1000) - maintc; 1554 maintc = (int)(MinFrameTime * 1000) - maintc;
1553 1555
1554 m_firstHeartbeat = false; 1556 m_firstHeartbeat = false;
1555 1557
1558
1559 sleepMS = Util.EnvironmentTickCount();
1560
1556 if (maintc > 0) 1561 if (maintc > 0)
1557 Thread.Sleep(maintc); 1562 Thread.Sleep(maintc);
1558 1563
1564 sleepMS = Util.EnvironmentTickCountSubtract(sleepMS);
1565 frameMS = Util.EnvironmentTickCountSubtract(framestart);
1566 StatsReporter.addSleepMS(sleepMS);
1567 StatsReporter.addFrameMS(frameMS);
1568
1559 // Optionally warn if a frame takes double the amount of time that it should. 1569 // Optionally warn if a frame takes double the amount of time that it should.
1560 if (DebugUpdates 1570 if (DebugUpdates
1561 && Util.EnvironmentTickCountSubtract( 1571 && Util.EnvironmentTickCountSubtract(