java.lang.Object
com.inductiveautomation.ignition.common.util.Stopwatch

public class Stopwatch extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Stopwatch, calls start() automatically.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the amount of time since the last call to start() (or this Stopwatch's creation) in milliseconds.
    long
    Returns the amount of time since the last call to start() (or this Stopwatch's creation) in the units specified.
    void
    Starts the stopwatch.

    Methods inherited from class java.lang.Object

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

    • Stopwatch

      public Stopwatch()
      Creates a new Stopwatch, calls start() automatically.
  • Method Details

    • start

      public void start()
      Starts the stopwatch. Subsequent calls to elapsed() will return the time since this call.
    • elapsed

      public long elapsed()
      Returns the amount of time since the last call to start() (or this Stopwatch's creation) in milliseconds.
    • elapsed

      public long elapsed(TimeUnit units)
      Returns the amount of time since the last call to start() (or this Stopwatch's creation) in the units specified.