Server.MainClass.TimeIt C# (CSharp) Méthode

TimeIt() static private méthode

static private TimeIt ( string title, Action action ) : void
title string
action Action
Résultat 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);
        }