public class PerformanceTimer
extends java.lang.Object
Constructor and Description |
---|
PerformanceTimer()
constructor
|
PerformanceTimer(java.util.logging.Logger log)
constructor
|
Modifier and Type | Method and Description |
---|---|
long |
end()
end the timer for the measurement
|
long |
getDuration()
set the duration
|
java.lang.String |
log(java.lang.String str)
Log the duration to log file and print on the Console
|
void |
logStd(java.lang.String str)
log the time duration to the std output
|
void |
start()
start the timer for the measurement
|
java.lang.String |
toString(java.lang.String str)
convert the duration to a string
|
public PerformanceTimer(java.util.logging.Logger log)
log
- public PerformanceTimer()
public void start()
public long end()
public long getDuration()
public java.lang.String log(java.lang.String str)
str
- log messagepublic void logStd(java.lang.String str)
str
- public java.lang.String toString(java.lang.String str)
str
-