org.neuroph.util.benchmark
Class Stopwatch
- java.lang.Object
-
- org.neuroph.util.benchmark.Stopwatch
-
public class Stopwatch extends java.lang.ObjectA class to help benchmark code, it simulates a real stop watch.
-
-
Constructor Summary
Constructors Constructor and Description Stopwatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description longgetElapsedTime()Returns elapsed time in milliseconds between calls to start and stop methods If the watch has never been started, returns zerovoidreset()Resets the stopwatch (clears start and stop time)voidstart()Starts measuring timevoidstop()Stops measuring time
-
-
-
Method Detail
-
start
public void start()
Starts measuring time
-
stop
public void stop()
Stops measuring time
-
getElapsedTime
public long getElapsedTime()
Returns elapsed time in milliseconds between calls to start and stop methods If the watch has never been started, returns zero
-
reset
public void reset()
Resets the stopwatch (clears start and stop time)
-
-
DMelt 3.0 © DataMelt by jWork.ORG