Server.MainClass.TimeIt C# (CSharp) Method

TimeIt() static private method

static private TimeIt ( string title, Action action ) : void
title string
action Action
return void
        static void TimeIt(string title, Action action)
        {
            var sw = new System.Diagnostics.Stopwatch ();
            sw.Start ();
            action ();
            sw.Stop ();
            Console.WriteLine ("{0} - {1} ms", title, sw.ElapsedMilliseconds);
        }