Package com.ibm.wala.util.debug
Class LoggingStopwatch
- java.lang.Object
-
- com.ibm.wala.util.debug.LoggingStopwatch
-
public class LoggingStopwatch extends Object
A stop watch that prints log messages.
-
-
Constructor Summary
Constructors Constructor Description LoggingStopwatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
mark(String msg)
Convenience method that invokesmark(String, boolean)
withtrue
as its second argument.long
mark(String msg, boolean reset)
Mark the completion of a task, print the time it took to complete, and optionally restart the stopwatch.void
start()
Start the stopwatch.
-
-
-
Method Detail
-
start
public void start()
Start the stopwatch.
-
mark
public long mark(String msg, boolean reset)
Mark the completion of a task, print the time it took to complete, and optionally restart the stopwatch.- Parameters:
msg
- message to printreset
- whether to restart the stopwatch- Returns:
- the elapsed time in milliseconds
-
mark
public long mark(String msg)
Convenience method that invokesmark(String, boolean)
withtrue
as its second argument.
-
-