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