Package org.apache.uima.internal.util
Class JavaTimer
java.lang.Object
org.apache.uima.internal.util.JavaTimer
- All Implemented Interfaces:
Serializable
,UimaTimer
Simple implementation of
UimaTimer
using System.currentTimeMillis()
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the time between the last call to stopIt() and the last call to startIt().int
Gets the timer resolution in milliseconds.long
Gets the current time in microseconds.long
Gets the current time in milliseconds.long
Gets the current time in seconds.long
startIt()
Starts the timer.long
stopIt()
Stops the timer.
-
Constructor Details
-
JavaTimer
public JavaTimer()
-
-
Method Details
-
startIt
public long startIt()Description copied from interface:UimaTimer
Starts the timer. -
stopIt
public long stopIt()Description copied from interface:UimaTimer
Stops the timer. -
getResolution
public int getResolution()Description copied from interface:UimaTimer
Gets the timer resolution in milliseconds.- Specified by:
getResolution
in interfaceUimaTimer
- Returns:
- the timer resolution in milliseconds
-
getDuration
public long getDuration()Description copied from interface:UimaTimer
Gets the time between the last call to stopIt() and the last call to startIt().- Specified by:
getDuration
in interfaceUimaTimer
- Returns:
- the duration in milliseconds
-
getTimeInSecs
public long getTimeInSecs()Description copied from interface:UimaTimer
Gets the current time in seconds.- Specified by:
getTimeInSecs
in interfaceUimaTimer
- Returns:
- the current time in seconds
-
getTimeInMillis
public long getTimeInMillis()Description copied from interface:UimaTimer
Gets the current time in milliseconds.- Specified by:
getTimeInMillis
in interfaceUimaTimer
- Returns:
- the current time in milliseconds
-
getTimeInMicros
public long getTimeInMicros()Description copied from interface:UimaTimer
Gets the current time in microseconds.- Specified by:
getTimeInMicros
in interfaceUimaTimer
- Returns:
- the current time in microseconds
-