net.sf.antcontrib.perf

Class AntPerformanceListener.StopWatch

public class AntPerformanceListener.StopWatch extends Object

A stopwatch, useful for 'quick and dirty' performance testing.

Version: $Revision: 1.3 $

Author: Dale Anson

Constructor Summary
StopWatch()
Starts the stopwatch.
Method Summary
longelapsed()
Elapsed time, difference between the last start time and now.
longstart()
Starts/restarts the stopwatch.
longstop()
Stops the stopwatch.
longtotal()
Total cumulative elapsed time.

Constructor Detail

StopWatch

public StopWatch()
Starts the stopwatch.

Method Detail

elapsed

public long elapsed()
Elapsed time, difference between the last start time and now.

Returns: the elapsed time

start

public long start()
Starts/restarts the stopwatch.

Returns: the start time, the long returned System.currentTimeMillis().

stop

public long stop()
Stops the stopwatch.

Returns: the stop time, the long returned System.currentTimeMillis().

total

public long total()
Total cumulative elapsed time.

Returns: the total time