Class Watch.TimeInterval

java.lang.Object
org.nuxeo.runtime.util.Watch.TimeInterval
All Implemented Interfaces:
Comparable<Watch.TimeInterval>
Enclosing class:
Watch

public static class Watch.TimeInterval extends Object implements Comparable<Watch.TimeInterval>
  • Field Details

    • name

      protected final String name
    • t0

      protected long t0
    • t1

      protected long t1
  • Constructor Details

    • TimeInterval

      public TimeInterval(String name)
  • Method Details

    • getName

      public String getName()
    • elapsed

      public long elapsed()
      Elapsed time in nano seconds
    • elapsed

      public long elapsed(TimeUnit unit)
    • start

      protected void start()
    • stop

      protected void stop()
    • isStopped

      public boolean isStopped()
    • compareTo

      public int compareTo(Watch.TimeInterval o)
      Specified by:
      compareTo in interface Comparable<Watch.TimeInterval>
    • formatSeconds

      public String formatSeconds()
    • toString

      public String toString()
      Overrides:
      toString in class Object