Class Stopwatch


  • @Scriptable
    public final class Stopwatch
    extends Object
    Stopwatch with millisecond time resolution.
    • Constructor Detail

      • Stopwatch

        public Stopwatch()
        Create a stopwatch with millisecond resolution.
      • Stopwatch

        public Stopwatch​(long p_lResolution)
        Create a stopwatch with a given resolution.
        Parameters:
        p_lResolution - One of MILLIS, MICROS or NANOS.
    • Method Detail

      • start

        public void start()
        Start the stopwatch.
      • stop

        public long stop()
        Get the meantime in milliseconds.
        Returns:
        The meantime in milliseconds.
      • restart

        public long restart()
        Get the meantime in milliseconds and reset to zero.
        Returns:
        The meantime in milliseconds.