restore higher resolution clock on udpserver and lower uaeraccouts caching time

melanie
UbitUmarov 2016-11-18 03:25:29 +00:00
parent d8812ba2d1
commit e281876ecd
2 changed files with 9 additions and 15 deletions

View File

@ -323,10 +323,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected int m_elapsedMSSinceLastStatReport = 0;
/// <summary>Environment.TickCount of the last time the outgoing packet handler executed</summary>
protected int m_tickLastOutgoingPacketHandler;
protected double m_tickLastOutgoingPacketHandler;
/// <summary>Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped</summary>
protected int m_elapsedMSOutgoingPacketHandler;
protected double m_elapsedMSOutgoingPacketHandler;
/// <summary>Keeps track of the number of 100 millisecond periods elapsed in the outgoing packet handler executed</summary>
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;
}

View File

@ -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(