protected virtual void Dispose(bool disposing) { if (this.isDisposed == false) { if (disposing) { TimeSpan elapsed = this.Elapsed(); this.parent.AddTime(this.name, elapsed); // show message if timer is not set to silent, and if time > 100ms (if timer is set to hideShort (which is the default)) if (this.IsSilent == false && (this.HideShort == false || elapsed.TotalSeconds > 1.0)) { Debug.WriteLine("Timer " + name + ": " + DebugTimer.TimeStr(this.Elapsed())); } } this.isDisposed = true; } }