Class StopwatchUtils

java.lang.Object
com.renomad.minum.testing.StopwatchUtils

public final class StopwatchUtils extends Object
This class provides some tools for running a virtual stopwatch while code is running, to examine code speed.

example:

 
 final var timer = new StopWatch().startTimer();
 for (var i = 1; i < 5; i++) {
     doStuff();
 }
 final var time = timer.stopTimer();
 printf("time taken was " + time " + milliseconds");
 
 
  • Constructor Details

    • StopwatchUtils

      public StopwatchUtils()
  • Method Details

    • startTimer

      public StopwatchUtils startTimer()
    • stopTimer

      public long stopTimer()