diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3e08128..32a98b4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1390,6 +1390,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1390 | int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS; | 1390 | int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS; |
1391 | int previousFrameTick; | 1391 | int previousFrameTick; |
1392 | int maintc; | 1392 | int maintc; |
1393 | int sleepMS; | ||
1393 | 1394 | ||
1394 | while (!m_shuttingDown && (endFrame == null || Frame < endFrame)) | 1395 | while (!m_shuttingDown && (endFrame == null || Frame < endFrame)) |
1395 | { | 1396 | { |
@@ -1557,9 +1558,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1557 | 1558 | ||
1558 | m_firstHeartbeat = false; | 1559 | m_firstHeartbeat = false; |
1559 | 1560 | ||
1561 | sleepMS = Util.EnvironmentTickCount(); | ||
1560 | if (maintc > 0) | 1562 | if (maintc > 0) |
1561 | Thread.Sleep(maintc); | 1563 | Thread.Sleep(maintc); |
1562 | 1564 | ||
1565 | sleepMS = Util.EnvironmentTickCountSubtract(sleepMS); | ||
1566 | StatsReporter.addSleepMS(sleepMS); | ||
1567 | |||
1563 | // Optionally warn if a frame takes double the amount of time that it should. | 1568 | // Optionally warn if a frame takes double the amount of time that it should. |
1564 | if (DebugUpdates | 1569 | if (DebugUpdates |
1565 | && Util.EnvironmentTickCountSubtract( | 1570 | && Util.EnvironmentTickCountSubtract( |