Klasse Stopwatch

java.lang.Object
de.uplanet.util.Stopwatch

@Scriptable public final class Stopwatch extends Object
Stopwatch with millisecond time resolution.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final long
     
    static final long
     
    static final long
     
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Create a stopwatch with millisecond resolution.
    Stopwatch(long p_lResolution)
    Create a stopwatch with a given resolution.
    Stopwatch(TimeUnit p_timeUnit)
    Create a stopwatch with a given resolution.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    long
    Get the meantime in the time unit given to the constructor and reset to zero.
    Start the stopwatch.
    long
    Get the meantime in the time unit given to the constructor.

    Von Klasse geerbte Methoden java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

  • Konstruktordetails

    • Stopwatch

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

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

      public Stopwatch(TimeUnit p_timeUnit)
      Create a stopwatch with a given resolution.
      Parameter:
      p_timeUnit - The resolution.
  • Methodendetails

    • start

      public Stopwatch start()
      Start the stopwatch.
      Gibt zurück:
      This stopwatch.
    • stop

      public long stop()
      Get the meantime in the time unit given to the constructor.
      Gibt zurück:
      The meantime.
    • restart

      public long restart()
      Get the meantime in the time unit given to the constructor and reset to zero.
      Gibt zurück:
      The meantime.