Class LoggingStopwatch


  • public class LoggingStopwatch
    extends Object
    A stop watch that prints log messages.
    • Constructor Detail

      • LoggingStopwatch

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