private void ReceiveClassicSimStatsPacket(SimStats stats) { if (!enabled) { return; } try { // Ignore the update if there's a report running right now // ignore the update if there hasn't been a hit in 30 seconds. if (concurrencyCounter > 0 || System.Environment.TickCount - lastHit > 30000) { return; } // We will conduct this under lock so that fields such as updateLogCounter do not potentially get // confused if a scene is removed. // XXX: Possibly the scope of this lock could be reduced though it's not critical. lock (m_scenes) { if (updateLogMod != 0 && updateLogCounter++ % updateLogMod == 0) { m_loglines = readLogLines(10); if (updateLogCounter > 10000) { updateLogCounter = 1; } } USimStatsData ss = m_simstatsCounters[stats.RegionUUID]; if ((++ss.StatsCounter % updateStatsMod) == 0) { ss.ConsumeSimStats(stats); } } } catch (KeyNotFoundException) { } }
private void ReceiveClassicSimStatsPacket(SimStats stats) { if (!enabled) { return; } try { // Ignore the update if there's a report running right now // ignore the update if there hasn't been a hit in 30 seconds. if (concurrencyCounter > 0 || System.Environment.TickCount - lastHit > 30000) { return; } if ((updateLogCounter++ % updateLogMod) == 0) { m_loglines = readLogLines(10); if (updateLogCounter > 10000) { updateLogCounter = 1; } } USimStatsData ss = m_simstatsCounters[stats.RegionUUID]; if ((++ss.StatsCounter % updateStatsMod) == 0) { ss.ConsumeSimStats(stats); } } catch (KeyNotFoundException) { } }