Package org.apache.uima.internal.util
Class JavaTimer
- java.lang.Object
-
- org.apache.uima.internal.util.JavaTimer
-
- All Implemented Interfaces:
java.io.Serializable,UimaTimer
public class JavaTimer extends java.lang.Object implements UimaTimer
Simple implementation ofUimaTimerusingSystem.currentTimeMillis().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JavaTimer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDuration()Gets the time between the last call to stopIt() and the last call to startIt().intgetResolution()Gets the timer resolution in milliseconds.longgetTimeInMicros()Gets the current time in microseconds.longgetTimeInMillis()Gets the current time in milliseconds.longgetTimeInSecs()Gets the current time in seconds.longstartIt()Starts the timer.longstopIt()Stops the timer.
-
-
-
Method Detail
-
startIt
public long startIt()
Description copied from interface:UimaTimerStarts the timer.
-
stopIt
public long stopIt()
Description copied from interface:UimaTimerStops the timer.
-
getResolution
public int getResolution()
Description copied from interface:UimaTimerGets the timer resolution in milliseconds.- Specified by:
getResolutionin interfaceUimaTimer- Returns:
- the timer resolution in milliseconds
-
getDuration
public long getDuration()
Description copied from interface:UimaTimerGets the time between the last call to stopIt() and the last call to startIt().- Specified by:
getDurationin interfaceUimaTimer- Returns:
- the duration in milliseconds
-
getTimeInSecs
public long getTimeInSecs()
Description copied from interface:UimaTimerGets the current time in seconds.- Specified by:
getTimeInSecsin interfaceUimaTimer- Returns:
- the current time in seconds
-
getTimeInMillis
public long getTimeInMillis()
Description copied from interface:UimaTimerGets the current time in milliseconds.- Specified by:
getTimeInMillisin interfaceUimaTimer- Returns:
- the current time in milliseconds
-
getTimeInMicros
public long getTimeInMicros()
Description copied from interface:UimaTimerGets the current time in microseconds.- Specified by:
getTimeInMicrosin interfaceUimaTimer- Returns:
- the current time in microseconds
-
-