/// <summary>
 /// Creates a timer and a stopwatch and attaches an End method to the timer
 /// </summary>
 /// <param name="interval">The duration of the phase in ms</param>
 public PhaseTime(int interval)
 {
     this.timer          = new Timer();
     this.timer.Interval = interval;
     this.timer.Tick    += new EventHandler(End);
     this.watch          = StopwatchSingleton.initialize();
 }
Exemple #2
0
 public static StopwatchSingleton initialize()
 {
     if (watch1 == null)
     {
         watch1       = new StopwatchSingleton();
         watch1.watch = new Stopwatch();
     }
     return(watch1);
 }