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.
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()
Copyright (C) NARC 2001 All Rights Reserved.