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();
}
}