Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.extensions.abbot
Class Timer  view Timer download Timer.java

java.lang.Object
  extended byjunit.extensions.abbot.Timer

public class Timer
extends java.lang.Object

Time and performance measurement utilities.


Field Summary
private  long start
          Time base for elapsed time calculations.
 
Constructor Summary
Timer()
          Basic constructor which sets the timer base to the current time.
 
Method Summary
 long elapsed()
          Return the number of milliseconds elapsed since the last timer reset.
 long elapsed(java.lang.Runnable action)
          Return the length of time elapsed to run the given runnable.
 void reset()
          Set the start time to the current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

private long start
Time base for elapsed time calculations.

Constructor Detail

Timer

public Timer()
Basic constructor which sets the timer base to the current time.

Method Detail

elapsed

public long elapsed()
Return the number of milliseconds elapsed since the last timer reset.


elapsed

public long elapsed(java.lang.Runnable action)
Return the length of time elapsed to run the given runnable.


reset

public void reset()
Set the start time to the current time.