aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorUbitUmarov2016-11-18 03:25:29 +0000
committerUbitUmarov2016-11-18 03:25:29 +0000
commite281876ecdb5edff737556c7200b8a902e66d05e (patch)
tree3324becdb5be558219f947373e9c5f9b6de56166 /OpenSim/Region/ClientStack/Linden
parent revert to lower resolution clock on udpserver for testing (diff)
downloadopensim-SC_OLD-e281876ecdb5edff737556c7200b8a902e66d05e.zip
opensim-SC_OLD-e281876ecdb5edff737556c7200b8a902e66d05e.tar.gz
opensim-SC_OLD-e281876ecdb5edff737556c7200b8a902e66d05e.tar.bz2
opensim-SC_OLD-e281876ecdb5edff737556c7200b8a902e66d05e.tar.xz
restore higher resolution clock on udpserver and lower uaeraccouts caching time
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs18
1 files changed, 7 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index b491110..af33d17 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -323,10 +323,10 @@ 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 int m_tickLastOutgoingPacketHandler; 326 protected double 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 double m_elapsedMSOutgoingPacketHandler;
330 330
331 /// <summary>Keeps track of the number of 100 millisecond periods elapsed in the outgoing packet handler executed</summary> 331 /// <summary>Keeps track of the number of 100 millisecond periods elapsed in the outgoing packet handler executed</summary>
332 protected int m_elapsed100MSOutgoingPacketHandler; 332 protected int m_elapsed100MSOutgoingPacketHandler;
@@ -2073,21 +2073,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2073 m_sendPing = false; 2073 m_sendPing = false;
2074 2074
2075 // Update elapsed time 2075 // Update elapsed time
2076 int thisTick = Environment.TickCount & Int32.MaxValue; 2076 double thisTick = Util.GetTimeStampMS();
2077 if (m_tickLastOutgoingPacketHandler > thisTick)
2078 m_elapsedMSOutgoingPacketHandler += ((Int32.MaxValue - m_tickLastOutgoingPacketHandler) + thisTick);
2079 else
2080 m_elapsedMSOutgoingPacketHandler += (thisTick - m_tickLastOutgoingPacketHandler);
2081
2082 m_tickLastOutgoingPacketHandler = thisTick;
2083 2077
2084 // update some 1ms resolution chained timers 2078 // update some 1ms resolution chained timers
2079 m_elapsedMSOutgoingPacketHandler += thisTick - m_tickLastOutgoingPacketHandler;
2080 m_tickLastOutgoingPacketHandler = thisTick;
2085 2081
2086 // Check for pending outgoing resends every 100ms 2082 // Check for pending outgoing resends every 100ms
2087 if (m_elapsedMSOutgoingPacketHandler >= 100) 2083 if (m_elapsedMSOutgoingPacketHandler >= 100.0)
2088 { 2084 {
2089 m_resendUnacked = true; 2085 m_resendUnacked = true;
2090 m_elapsedMSOutgoingPacketHandler = 0; 2086 m_elapsedMSOutgoingPacketHandler = 0.0;
2091 m_elapsed100MSOutgoingPacketHandler += 1; 2087 m_elapsed100MSOutgoingPacketHandler += 1;
2092 } 2088 }
2093 2089