public static PerformancePannel GetNamedPannel(string pannelName) { if (!resultsPannels.ContainsKey(pannelName)) { PerformancePannel timingPannelToReportTo = new PerformancePannel(pannelName); resultsPannels.Add(pannelName, timingPannelToReportTo); } return(resultsPannels[pannelName]); }
public PerformanceTimer(string pannelName, string name) { lock(locker) { if (!InPerformanceMeasuring) { InPerformanceMeasuring = true; if (pannelName == "_LAST_") { pannelName = lastPannelName; } this.timingPannelToReportTo = PerformancePannel.GetNamedPannel(pannelName); this.Name = name; this.timingPannelToReportTo.Start(this); lastPannelName = pannelName; InPerformanceMeasuring = false; } } }
public PerformanceTimer(string pannelName, string name) { lock (locker) { if (!InPerformanceMeasuring) { InPerformanceMeasuring = true; if (pannelName == "_LAST_") { pannelName = lastPannelName; } this.timingPannelToReportTo = PerformancePannel.GetNamedPannel(pannelName); this.Name = name; this.timingPannelToReportTo.Start(this); lastPannelName = pannelName; InPerformanceMeasuring = false; } } }
public static PerformancePannel GetNamedPannel(string pannelName) { if (!resultsPannels.ContainsKey(pannelName)) { PerformancePannel timingPannelToReportTo = new PerformancePannel(pannelName); resultsPannels.Add(pannelName, timingPannelToReportTo); } return resultsPannels[pannelName]; }