aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 32a98b4..a9a4cda 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1391,10 +1391,11 @@ namespace OpenSim.Region.Framework.Scenes
1391 int previousFrameTick; 1391 int previousFrameTick;
1392 int maintc; 1392 int maintc;
1393 int sleepMS; 1393 int sleepMS;
1394 int framestart;
1394 1395
1395 while (!m_shuttingDown && (endFrame == null || Frame < endFrame)) 1396 while (!m_shuttingDown && (endFrame == null || Frame < endFrame))
1396 { 1397 {
1397 maintc = Util.EnvironmentTickCount(); 1398 framestart = Util.EnvironmentTickCount();
1398 ++Frame; 1399 ++Frame;
1399 1400
1400// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName); 1401// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
@@ -1481,7 +1482,7 @@ namespace OpenSim.Region.Framework.Scenes
1481 // landMS = Util.EnvironmentTickCountSubtract(ldMS); 1482 // landMS = Util.EnvironmentTickCountSubtract(ldMS);
1482 //} 1483 //}
1483 1484
1484 frameMS = Util.EnvironmentTickCountSubtract(maintc); 1485 // frameMS = Util.EnvironmentTickCountSubtract(maintc);
1485 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; 1486 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
1486 1487
1487 // if (Frame%m_update_avatars == 0) 1488 // if (Frame%m_update_avatars == 0)
@@ -1496,7 +1497,7 @@ namespace OpenSim.Region.Framework.Scenes
1496 1497
1497 // frameMS currently records work frame times, not total frame times (work + any required sleep to 1498 // frameMS currently records work frame times, not total frame times (work + any required sleep to
1498 // reach min frame time. 1499 // reach min frame time.
1499 StatsReporter.addFrameMS(frameMS); 1500 // StatsReporter.addFrameMS(frameMS);
1500 1501
1501 StatsReporter.addAgentMS(agentMS); 1502 StatsReporter.addAgentMS(agentMS);
1502 StatsReporter.addPhysicsMS(physicsMS + physicsMS2); 1503 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
@@ -1553,17 +1554,21 @@ namespace OpenSim.Region.Framework.Scenes
1553 1554
1554 previousFrameTick = m_lastFrameTick; 1555 previousFrameTick = m_lastFrameTick;
1555 m_lastFrameTick = Util.EnvironmentTickCount(); 1556 m_lastFrameTick = Util.EnvironmentTickCount();
1556 maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, maintc); 1557 maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, framestart);
1557 maintc = (int)(MinFrameTime * 1000) - maintc; 1558 maintc = (int)(MinFrameTime * 1000) - maintc;
1558 1559
1559 m_firstHeartbeat = false; 1560 m_firstHeartbeat = false;
1560 1561
1562
1561 sleepMS = Util.EnvironmentTickCount(); 1563 sleepMS = Util.EnvironmentTickCount();
1564
1562 if (maintc > 0) 1565 if (maintc > 0)
1563 Thread.Sleep(maintc); 1566 Thread.Sleep(maintc);
1564 1567
1565 sleepMS = Util.EnvironmentTickCountSubtract(sleepMS); 1568 sleepMS = Util.EnvironmentTickCountSubtract(sleepMS);
1569 frameMS = Util.EnvironmentTickCountSubtract(framestart);
1566 StatsReporter.addSleepMS(sleepMS); 1570 StatsReporter.addSleepMS(sleepMS);
1571 StatsReporter.addFrameMS(frameMS);
1567 1572
1568 // Optionally warn if a frame takes double the amount of time that it should. 1573 // Optionally warn if a frame takes double the amount of time that it should.
1569 if (DebugUpdates 1574 if (DebugUpdates