net.agmodel.utility
Class Stopwatch
java.lang.Object
|
+--net.agmodel.utility.Stopwatch
- public class Stopwatch
- extends Object
A simple timer for measuring performance.
Taken from "Java Platform Performance - Strategies and Tactics" by Steve Wilson and Jeff Kesselman
Modified to return a Duration rather than the raw milliseconds.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Stopwatch
public Stopwatch()
start
public Stopwatch start()
stop
public Stopwatch stop()
getElapsedTime
public Duration getElapsedTime()
- Get the elapsed time in milliseconds.
reset
public Stopwatch reset()