revert to lower resolution clock on udpserver for testing
parent
0a8cf2ff08
commit
d8812ba2d1
|
@ -323,7 +323,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected int m_elapsedMSSinceLastStatReport = 0;
|
protected int m_elapsedMSSinceLastStatReport = 0;
|
||||||
|
|
||||||
/// <summary>Environment.TickCount of the last time the outgoing packet handler executed</summary>
|
/// <summary>Environment.TickCount of the last time the outgoing packet handler executed</summary>
|
||||||
protected double m_tickLastOutgoingPacketHandler;
|
protected int m_tickLastOutgoingPacketHandler;
|
||||||
|
|
||||||
/// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped</summary>
|
/// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped</summary>
|
||||||
protected int m_elapsedMSOutgoingPacketHandler;
|
protected int m_elapsedMSOutgoingPacketHandler;
|
||||||
|
@ -2073,14 +2073,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_sendPing = false;
|
m_sendPing = false;
|
||||||
|
|
||||||
// Update elapsed time
|
// Update elapsed time
|
||||||
double thisTick = Util.GetTimeStampMS();
|
int thisTick = Environment.TickCount & Int32.MaxValue;
|
||||||
int deltaMS = (int)(thisTick - m_tickLastOutgoingPacketHandler);
|
if (m_tickLastOutgoingPacketHandler > thisTick)
|
||||||
|
m_elapsedMSOutgoingPacketHandler += ((Int32.MaxValue - m_tickLastOutgoingPacketHandler) + thisTick);
|
||||||
|
else
|
||||||
|
m_elapsedMSOutgoingPacketHandler += (thisTick - m_tickLastOutgoingPacketHandler);
|
||||||
|
|
||||||
m_tickLastOutgoingPacketHandler = thisTick;
|
m_tickLastOutgoingPacketHandler = thisTick;
|
||||||
|
|
||||||
// update some 1ms resolution chained timers
|
// update some 1ms resolution chained timers
|
||||||
|
|
||||||
m_elapsedMSOutgoingPacketHandler += deltaMS;
|
|
||||||
|
|
||||||
// Check for pending outgoing resends every 100ms
|
// Check for pending outgoing resends every 100ms
|
||||||
if (m_elapsedMSOutgoingPacketHandler >= 100)
|
if (m_elapsedMSOutgoingPacketHandler >= 100)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue