public static IDisposable Time(string BlockName) { Timer info; if (!Infos.ContainsKey(BlockName)) { info = new Timer(BlockName); Infos[BlockName] = info; } else { info = Infos[BlockName]; } //Timer timer = new Timer(); return info.StartExecution(); }
// Timer needs to hold reference to TimingInfo in order to update it on disposal. public StartTime(Timer info) { this.info = info; }