Class StopWatch


  • public class StopWatch
    extends Object
    Class to implement a stop watch
    • Constructor Detail

      • StopWatch

        public StopWatch()
        Constructor
      • StopWatch

        public StopWatch​(boolean autoStart)
        Constructor
        Parameters:
        autoStart - autoStart
    • Method Detail

      • start

        public StopWatch start()
        Method to start the stop watch
        Returns:
        this
      • stop

        public StopWatch stop()
        Method to stop the stop watch
        Returns:
        this
      • elapsedNanoTime

        public long elapsedNanoTime()
        Method to get the elapsed time in nanoseconds
        Returns:
        the elapsed time in nanoseconds