Exemple #1
0
		public void StartRegion(string name)
		{
			StopwatchHolder swh;
			if(!records.TryGetValue(name,out swh))
			swh = new StopwatchHolder { count=0, sw=new Stopwatch() };

			swh.count++;
			swh.sw.Start();

			records[name] = swh;
		}
Exemple #2
0
        public void StartRegion(string name)
        {
            StopwatchHolder swh;

            if (!records.TryGetValue(name, out swh))
            {
                swh = new StopwatchHolder {
                    count = 0, sw = new Stopwatch()
                }
            }
            ;

            swh.count++;
            swh.sw.Start();

            records[name] = swh;
        }
 public void StopwatchAsField()
 {
     _ = new StopwatchHolder();
 }