From 26bcb1e9a1037b84d12e04ece41aca751f293d81 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 28 Jun 2017 18:43:39 -0400 Subject: [PATCH] Removed duplicate code --- BNetServer/Server.cs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/BNetServer/Server.cs b/BNetServer/Server.cs index d34f8046a..68f43cbad 100644 --- a/BNetServer/Server.cs +++ b/BNetServer/Server.cs @@ -124,31 +124,5 @@ namespace BNetServer } static Timer _banExpiryCheckTimer; - - static void Profile(string description, int iterations, Action func) - { - //Run at highest priority to minimize fluctuations caused by other processes/threads - System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.High; - System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.Highest; - - // warm up - func(); - - var watch = new System.Diagnostics.Stopwatch(); - - // clean up - GC.Collect(); - GC.WaitForPendingFinalizers(); - GC.Collect(); - - watch.Start(); - for (int i = 0; i < iterations; i++) - { - func(); - } - watch.Stop(); - Console.Write(description); - Console.WriteLine(" Time Elapsed {0} ms", watch.Elapsed.TotalMilliseconds); - } } }