aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 8355f2b..ffdb639 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -444,10 +444,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
444 int now = start; 444 int now = start;
445 while (now == start) 445 while (now == start)
446 now = Environment.TickCount; 446 now = Environment.TickCount;
447 TickCountResolution += (float)(now - start) * 0.1f; 447 TickCountResolution += (float)(now - start);
448 } 448 }
449 TickCountResolution = (float)Math.Ceiling(TickCountResolution); 449 m_log.Info("[LLUDPSERVER]: Average Environment.TickCount resolution: " + TickCountResolution * 0.1f + "ms");
450 m_log.Info("[LLUDPSERVER]: Average Environment.TickCount resolution: " + TickCountResolution + "ms"); 450
451 TickCountResolution = 0f;
452 for (int i = 0; i < 100; i++)
453 {
454 double start = Util.GetTimeStampMS();
455 double now = start;
456 while (now == start)
457 now = Util.GetTimeStampMS();
458 TickCountResolution += (float)((now - start));
459 }
460
461 TickCountResolution = (float)Math.Round(TickCountResolution * 0.01f,6,MidpointRounding.AwayFromZero);
462 m_log.Info("[LLUDPSERVER]: Average Util.GetTimeStampMS resolution: " + TickCountResolution + "ms");
451 463
452 #endregion Environment.TickCount Measurement 464 #endregion Environment.TickCount Measurement
453 465