Category5.Profiler.StartTime C# (CSharp) Method

StartTime() public static method

public static StartTime ( string function ) : void
function string
return void
        public static void StartTime(string function)
        {
            if (enableProfiling)
            {
                if (Timers == null)
                    Timers = new Dictionary<string, Stopwatch>();

                if (!Timers.ContainsKey(function))
                    Timers[function] = new Stopwatch();

                Stopwatch stopwatch = Timers[function];

                stopwatch.Reset();
                stopwatch.Start();
            }
        }