display heatbeat sleep time in stats. This may not be good for general use, but for testing/debug
parent
95bb2049a0
commit
1cfee4e84c
|
@ -1390,6 +1390,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS;
|
int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS;
|
||||||
int previousFrameTick;
|
int previousFrameTick;
|
||||||
int maintc;
|
int maintc;
|
||||||
|
int sleepMS;
|
||||||
|
|
||||||
while (!m_shuttingDown && (endFrame == null || Frame < endFrame))
|
while (!m_shuttingDown && (endFrame == null || Frame < endFrame))
|
||||||
{
|
{
|
||||||
|
@ -1557,9 +1558,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_firstHeartbeat = false;
|
m_firstHeartbeat = false;
|
||||||
|
|
||||||
|
sleepMS = Util.EnvironmentTickCount();
|
||||||
if (maintc > 0)
|
if (maintc > 0)
|
||||||
Thread.Sleep(maintc);
|
Thread.Sleep(maintc);
|
||||||
|
|
||||||
|
sleepMS = Util.EnvironmentTickCountSubtract(sleepMS);
|
||||||
|
StatsReporter.addSleepMS(sleepMS);
|
||||||
|
|
||||||
// Optionally warn if a frame takes double the amount of time that it should.
|
// Optionally warn if a frame takes double the amount of time that it should.
|
||||||
if (DebugUpdates
|
if (DebugUpdates
|
||||||
&& Util.EnvironmentTickCountSubtract(
|
&& Util.EnvironmentTickCountSubtract(
|
||||||
|
|
Loading…
Reference in New Issue