Ejemplo n.º 1
0
 /** Stop the stopwatch and add the interval to the accumulated total */
 public void stop() {
   if (isRunning) {
     SimTime offset = SimTime.subtract(Harness.getTime(), startTime);
     accumulatedTime = SimTime.add(accumulatedTime, offset);
     startTime = null;
     isRunning = false;
   }
 }
Ejemplo n.º 2
0
 /** Start the stopwatch */
 public void start() {
   if (!isRunning) {
     startTime = Harness.getTime();
     isRunning = true;
   }
 }