Example #1
0
        public static PerformancePanel GetNamedPanel(string panelName)
        {
            if (!resultsPanels.ContainsKey(panelName))
            {
                PerformancePanel timingPanelToReportTo = new PerformancePanel(panelName);
                resultsPanels.Add(panelName, timingPanelToReportTo);
            }

            return(resultsPanels[panelName]);
        }
		public PerformanceTimer(string panelName, string name)
		{
			lock (locker)
			{
				if (!InPerformanceMeasuring)
				{
					InPerformanceMeasuring = true;
					if (panelName == "_LAST_")
					{
						panelName = lastPanelName;
					}

					this.timingPanelToReportTo = PerformancePanel.GetNamedPanel(panelName);
					this.Name = name;
					this.timingPanelToReportTo.Start(this);

					lastPanelName = panelName;
					InPerformanceMeasuring = false;
				}
			}
		}