Package org.nuxeo.runtime.util
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>
-
-
Constructor Summary
Constructors Constructor Description TimeInterval(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Watch.TimeInterval o)
long
elapsed()
Elapsed time in nano secondslong
elapsed(TimeUnit unit)
String
formatSeconds()
String
getName()
boolean
isStopped()
protected void
start()
protected void
stop()
String
toString()
-
-
-
Field Detail
-
name
protected final String name
-
t0
protected long t0
-
t1
protected long t1
-
-
Constructor Detail
-
TimeInterval
public TimeInterval(String name)
-
-
Method Detail
-
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 interfaceComparable<Watch.TimeInterval>
-
formatSeconds
public String formatSeconds()
-
-