Class Timing


  • public class Timing
    extends Object
    Helper class for encapsulated time measurements.
    • Constructor Detail

      • Timing

        public Timing()
      • Timing

        public Timing​(boolean start)
    • Method Detail

      • start

        public void start()
        Starts the time measurement.
      • stop

        public double stop()
        Measures and returns the time since the last start() or stop() invocation and restarts the measurement.
        Returns:
        duration between start and stop
      • stopAndPrint

        public void stopAndPrint()
        Measures and returns the time since the last start() or stop() invocation, restarts the measurement, and prints the last measurement to STDOUT.