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.


Constructor Summary
Stopwatch()
           
 
Method Summary
 Duration getElapsedTime()
          Get the elapsed time in milliseconds.
 Stopwatch reset()
           
 Stopwatch start()
           
 Stopwatch stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stopwatch

public Stopwatch()
Method Detail

start

public Stopwatch start()

stop

public Stopwatch stop()

getElapsedTime

public Duration getElapsedTime()
Get the elapsed time in milliseconds.


reset

public Stopwatch reset()