Package com.dkt.graphics.utils
Class TicToc
java.lang.Object
com.dkt.graphics.utils.TicToc
Implements a Tic-Toc mechanism.
This class is very basic, but at least it's easy...
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
-
getIterations
public int getIterations()Counts the number oftoc()
calls- Returns:
- number of calls
-