Class LoggingStopwatch

java.lang.Object
com.ibm.wala.util.debug.LoggingStopwatch

public class LoggingStopwatch extends Object
A stop watch that prints log messages.
Author:
mschaefer
  • Constructor Details

    • LoggingStopwatch

      public LoggingStopwatch()
  • Method Details

    • 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 print
      reset - whether to restart the stopwatch
      Returns:
      the elapsed time in milliseconds
    • mark

      public long mark(String msg)
      Convenience method that invokes mark(String, boolean) with true as its second argument.