public static bool StopTimer(string name) { DiagTimer t = TimerDictionary[name]; if (t != null) { t.Stop(); return(true); } else { return(false); } }
public static string StopAndGetTimer(string name) { DiagTimer t = TimerDictionary[name]; if (t != null) { t.Stop(); return(GetTimer(name)); } else { return("Error: " + name + " Not Found"); } }