Interface Chronometer


  • public interface Chronometer
    The interface Chronometer permits to measure the time elapsed between two time snapshots.
    • Method Detail

      • start

        long start()
        Start the timer.
      • stop

        long stop()
        Stop the timer.
      • elapsedTime

        long elapsedTime()
        Return the elapsed time measured in nanoseconds since the very start.
        Returns:
        long, the time.
      • formatElapsedTime

        String formatElapsedTime​(long millis)
        Return the time specified in human readable format.
        Parameters:
        millis - The time to format in milliseconds.
        Returns:
        Examples: 2d 3h 44m 2s or 20 weeks 3h 3s