Class ScopedTimer

  • public class ScopedTimer
    extends java.lang.Object
    Times what is executed in a scope.

    Automatically calls resume on the timer given in construction and pause when destroyed.

    Note: usage
    ... long time; { // put code here that is not to be timed ScopedTimer timer(time); // put code here that is to be timed } std::cout << "Time: " << time << std::endl;
    • Constructor Detail

      • ScopedTimer

        public ScopedTimer​(long cPtr,
                           boolean cMemoryOwn)
      • ScopedTimer

        public ScopedTimer​(Timer timer)
        constructor. Starts the timer
        timer -
    • Method Detail

      • getCPtr

        public static long getCPtr​(ScopedTimer obj)
      • delete

        public void delete()
      • getTimer

        public Timer getTimer()
        Returns the time wrapped in the ScopedTimer
        Timer wrapped