Package org.apache.jena.atlas.lib
Class Timer
- java.lang.Object
-
- org.apache.jena.atlas.lib.Timer
-
public class Timer extends java.lang.ObjectA Timer of operations
-
-
Constructor Summary
Constructors Constructor Description Timer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longendTimer()Stop timing and return the elapsed time in millisecondslonggetTimeInterval()Read an elapsed timerlongread()Read the timer - either the instantanious value (if running) or elapsed time (if finished).longreadTimer()Read a running timervoidstartTimer()static longtime(java.lang.Runnable action)Time an operation.static java.lang.StringtimeStr(long timeInterval)Helper function to format milliseconds as "%.3f" seconds
-
-
-
Method Detail
-
startTimer
public void startTimer()
-
endTimer
public long endTimer()
Stop timing and return the elapsed time in milliseconds
-
read
public long read()
Read the timer - either the instantanious value (if running) or elapsed time (if finished).
-
readTimer
public long readTimer()
Read a running timer
-
getTimeInterval
public long getTimeInterval()
Read an elapsed timer
-
timeStr
public static java.lang.String timeStr(long timeInterval)
Helper function to format milliseconds as "%.3f" seconds
-
time
public static long time(java.lang.Runnable action)
Time an operation. Return the elapsed time in milliseconds.
-
-