Class TicToc

java.lang.Object
com.dkt.graphics.utils.TicToc

public final class TicToc extends Object
Implements a Tic-Toc mechanism.
This class is very basic, but at least it's easy...
Author:
Federico Vera <[email protected]>
  • Constructor Details

    • TicToc

      public TicToc()
  • Method Details

    • 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
    • getMillisTime

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

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

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

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