Package bbflow
Class customWatch
java.lang.Object
bbflow.customWatch
custom time watch class to measure & print performance
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
stop the watchlong
return the total execution timevoid
print report in microsecondsvoid
printReport
(boolean ms) print report of the registered timesvoid
start()
start the watchvoid
watch()
register a new step in the watch
-
Field Details
-
starttime
long starttime -
endtime
long endtime -
steps
-
-
Constructor Details
-
customWatch
public customWatch()
-
-
Method Details
-
start
public void start()start the watch -
end
public void end()stop the watch -
watch
public void watch()register a new step in the watch -
printReport
public void printReport(boolean ms) print report of the registered times- Parameters:
ms
- true if report in milliseconds, otherwise microseconds used
-
printReport
public void printReport()print report in microseconds -
getExecutionTime
public long getExecutionTime()return the total execution time- Returns:
- total execution time
-