aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2016-11-18 03:00:59 +0000
committerUbitUmarov2016-11-18 03:00:59 +0000
commitd8812ba2d1a82bf2e6c945544cb72a6412ef48ae (patch)
tree10cdf74ed97ed9eefbd9e0363499e73fa71ff433 /OpenSim/Region/ClientStack
parent put back skip of first drip call (diff)
downloadopensim-SC_OLD-d8812ba2d1a82bf2e6c945544cb72a6412ef48ae.zip
opensim-SC_OLD-d8812ba2d1a82bf2e6c945544cb72a6412ef48ae.tar.gz
opensim-SC_OLD-d8812ba2d1a82bf2e6c945544cb72a6412ef48ae.tar.bz2
opensim-SC_OLD-d8812ba2d1a82bf2e6c945544cb72a6412ef48ae.tar.xz
revert to lower resolution clock on udpserver for testing
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index ffdb639..b491110 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -323,7 +323,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
323 protected int m_elapsedMSSinceLastStatReport = 0; 323 protected int m_elapsedMSSinceLastStatReport = 0;
324 324
325 /// <summary>Environment.TickCount of the last time the outgoing packet handler executed</summary> 325 /// <summary>Environment.TickCount of the last time the outgoing packet handler executed</summary>
326 protected double m_tickLastOutgoingPacketHandler; 326 protected int m_tickLastOutgoingPacketHandler;
327 327
328 /// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped</summary> 328 /// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped</summary>
329 protected int m_elapsedMSOutgoingPacketHandler; 329 protected int m_elapsedMSOutgoingPacketHandler;
@@ -2073,13 +2073,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2073 m_sendPing = false; 2073 m_sendPing = false;
2074 2074
2075 // Update elapsed time 2075 // Update elapsed time
2076 double thisTick = Util.GetTimeStampMS(); 2076 int thisTick = Environment.TickCount & Int32.MaxValue;
2077 int deltaMS = (int)(thisTick - m_tickLastOutgoingPacketHandler); 2077 if (m_tickLastOutgoingPacketHandler > thisTick)
2078 m_elapsedMSOutgoingPacketHandler += ((Int32.MaxValue - m_tickLastOutgoingPacketHandler) + thisTick);
2079 else
2080 m_elapsedMSOutgoingPacketHandler += (thisTick - m_tickLastOutgoingPacketHandler);
2081
2078 m_tickLastOutgoingPacketHandler = thisTick; 2082 m_tickLastOutgoingPacketHandler = thisTick;
2079 2083
2080 // update some 1ms resolution chained timers 2084 // update some 1ms resolution chained timers
2081
2082 m_elapsedMSOutgoingPacketHandler += deltaMS;
2083 2085
2084 // Check for pending outgoing resends every 100ms 2086 // Check for pending outgoing resends every 100ms
2085 if (m_elapsedMSOutgoingPacketHandler >= 100) 2087 if (m_elapsedMSOutgoingPacketHandler >= 100)