diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index b491110fd8..af33d17b7e 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 protected int m_elapsedMSSinceLastStatReport = 0; /// Environment.TickCount of the last time the outgoing packet handler executed - protected int m_tickLastOutgoingPacketHandler; + protected double m_tickLastOutgoingPacketHandler; /// Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped - protected int m_elapsedMSOutgoingPacketHandler; + protected double m_elapsedMSOutgoingPacketHandler; /// Keeps track of the number of 100 millisecond periods elapsed in the outgoing packet handler executed protected int m_elapsed100MSOutgoingPacketHandler; @@ -2073,21 +2073,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_sendPing = false; // Update elapsed time - int thisTick = Environment.TickCount & Int32.MaxValue; - if (m_tickLastOutgoingPacketHandler > thisTick) - m_elapsedMSOutgoingPacketHandler += ((Int32.MaxValue - m_tickLastOutgoingPacketHandler) + thisTick); - else - m_elapsedMSOutgoingPacketHandler += (thisTick - m_tickLastOutgoingPacketHandler); - - m_tickLastOutgoingPacketHandler = thisTick; + double thisTick = Util.GetTimeStampMS(); // update some 1ms resolution chained timers + m_elapsedMSOutgoingPacketHandler += thisTick - m_tickLastOutgoingPacketHandler; + m_tickLastOutgoingPacketHandler = thisTick; // Check for pending outgoing resends every 100ms - if (m_elapsedMSOutgoingPacketHandler >= 100) + if (m_elapsedMSOutgoingPacketHandler >= 100.0) { m_resendUnacked = true; - m_elapsedMSOutgoingPacketHandler = 0; + m_elapsedMSOutgoingPacketHandler = 0.0; m_elapsed100MSOutgoingPacketHandler += 1; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index 6d2efc6fa0..6c1cc525b2 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs @@ -36,10 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { public class UserAccountCache : IUserAccountCacheModule { -// private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour! -// private const double CACHE_NULL_EXPIRATION_SECONDS = 600; // 10minutes - private const double CACHE_EXPIRATION_SECONDS = 120000.0; - private const double CACHE_NULL_EXPIRATION_SECONDS = 120000.0; + private const double CACHE_EXPIRATION_SECONDS = 3600.0; // 1 hour! + private const double CACHE_NULL_EXPIRATION_SECONDS = 600; // 10minutes // private static readonly ILog m_log = // LogManager.GetLogger(