* Changed the timing calculations for sending resends/acks/pings from per-client back to per-scene

* Testing a fix from Jim to make the cpu usage fix cleaner
This commit is contained in:
John Hurliman
2009-10-21 15:22:23 -07:00
parent 62f1bfd136
commit 2752a3525c
3 changed files with 63 additions and 41 deletions

View File

@@ -103,14 +103,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool IsPaused;
/// <summary>Environment.TickCount when the last packet was received for this client</summary>
public int TickLastPacketReceived;
/// <summary>Environment.TickCount of the last time the outgoing packet handler executed for this client</summary>
public int TickLastOutgoingPacketHandler;
/// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler executed for this client</summary>
public int ElapsedMSOutgoingPacketHandler;
/// <summary>Keeps track of the number of 100 millisecond periods elapsed in the outgoing packet handler executed for this client</summary>
public int Elapsed100MSOutgoingPacketHandler;
/// <summary>Keeps track of the number of 500 millisecond periods elapsed in the outgoing packet handler executed for this client</summary>
public int Elapsed500MSOutgoingPacketHandler;
/// <summary>Smoothed round-trip time. A smoothed average of the round-trip time for sending a
/// reliable packet to the client and receiving an ACK</summary>
@@ -191,9 +183,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Initialize this to a sane value to prevent early disconnects
TickLastPacketReceived = Environment.TickCount & Int32.MaxValue;
ElapsedMSOutgoingPacketHandler = 0;
Elapsed100MSOutgoingPacketHandler = 0;
Elapsed500MSOutgoingPacketHandler = 0;
}
/// <summary>
@@ -553,7 +542,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
// HACK: Try spending some extra time here to slow down OnQueueEmpty calls
System.Threading.Thread.Sleep(100);
//System.Threading.Thread.Sleep(100);
m_onQueueEmptyRunning[i] = false;
}