Class TicToc


  • public final class TicToc
    extends java.lang.Object
    Implements a Tic-Toc mechanism.
    This class is very basic, but at least it's easy...
    • Constructor Detail

      • TicToc

        public TicToc()
        Creates a new instance
    • Method Detail

      • tic

        public void tic()
        Sets the start time
      • toc

        public void toc()
        Sets the end time
      • getNanoTime

        public double getNanoTime()
        Returns:
        elapsed time in ns
      • getMicroTime

        public double getMicroTime()
        Returns:
        elapsed time in ┬Ás
      • getMilisTime

        public double getMilisTime()
        Returns:
        elapsed time in ms
      • getSecsTime

        public double getSecsTime()
        Returns:
        elapsed time in s
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getIterations

        public int getIterations()
        Counts the number of toc() calls
        Returns:
        number of calls