1 using System; 2 3 class Timer { 4 public Timer() {initialTicks_ = Environment.TickCount;} 5 public override string ToString() { return String.Format("{0:###,##0.###}", getSeconds());} 6 public double getSeconds() {return (Environment.TickCount - initialTicks_)/1000.0;} 7 8 private int initialTicks_; 9 }