public override int GetHashCode() { unchecked { return((ElapsedTicks.GetHashCode() * 397) ^ MetricValue.GetHashCode()); } }
public void WriteAndReset(string name) { Stop(); System.IO.File.AppendAllText("stopwatch.txt", name + " " + ElapsedTicks.ToString() + Environment.NewLine); Reset(); Start(); }
public override int GetHashCode() { unchecked { return((ElapsedTicks.GetHashCode() * 397) ^ ActualRunsMeasured.GetHashCode()); } }
public void Print(int ticksWidth = 0, int millisecondsWidth = 0, string hint = "") { ConsoleHelper.WriteResult("Ticks: {0} ms: {1}", ElapsedTicks.ToString().PadLeft(ticksWidth), ElapsedMilliseconds.ToString().PadLeft(millisecondsWidth)); if (!string.IsNullOrEmpty(hint)) { ConsoleHelper.WriteResult(" [{0}]", hint); } ConsoleHelper.NewLine(); }