StopWatch.


// StopWatch.java

package StopWatch;

import java.util.*;

public class StopWatch
{
  public void start()
  {
    _startTime = new Date().getTime();
  }

  public void stop()
  {
    _stopTime = new Date().getTime();
  }

  public long display1()
  {
    return _stopTime - _startTime;
  }

  public long display2()
  {
    long currTime = new Date().getTime();
    return currTime - _startTime;
  }

  long _startTime;
  long _stopTime;
}