Package 

Class Stopwatch


  • 
    public class Stopwatch
    
                        

    Utility class for high precision time keeping.

    • Constructor Summary

      Constructors 
      Constructor Description
      Stopwatch() Creates a new stopwatch instance.
    • Method Summary

      Modifier and Type Method Description
      Duration duration() Retrieves the elapsed time since its last start or reset.
      long nanoseconds() Retrieves the elapsed nanoseconds since its last start or reset.
      double milliseconds() Retrieves the elapsed milliseconds since its last start or reset.
      void reset() Resets the stopwatch.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Stopwatch

        Stopwatch()
        Creates a new stopwatch instance.
    • Method Detail

      • duration

         Duration duration()

        Retrieves the elapsed time since its last start or reset.

      • nanoseconds

         long nanoseconds()

        Retrieves the elapsed nanoseconds since its last start or reset.

      • milliseconds

         double milliseconds()

        Retrieves the elapsed milliseconds since its last start or reset.

      • reset

         void reset()

        Resets the stopwatch.