Class StopWatch


  • public class StopWatch
    extends Object
    Utility to help in performance testing.
    • Constructor Detail

      • StopWatch

        public StopWatch()
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • reset

        public void reset()
      • getElapsedTime

        public long getElapsedTime()
        Returns the cumulative time between all the start() and stop() calls made to this object. If the StopWatch is currently running, also includes the time between the most recent start() and now.
        Returns:
        elapsedTime in milliseconds
      • getElapsedTimeSecs

        public long getElapsedTimeSecs()
        Returns:
        same as getElapsedTime(), but truncated to seconds.