org.pelds.util
Class Timer

java.lang.Object
  extended by org.pelds.util.Timer

public class Timer
extends java.lang.Object

Simple timer class for internal time measurement

Author:
Hannes Muehleisen (hannes@muehleisen.org)

Constructor Summary
Timer(java.lang.String aName)
          Constructor, creates a timer with the given label
 
Method Summary
 Timer start()
          Start the new timer
 long stop()
          Stop the timer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timer

public Timer(java.lang.String aName)
Constructor, creates a timer with the given label

Parameters:
aName - timer label
Method Detail

start

public Timer start()
Start the new timer

Returns:
current timer instance for call chaining

stop

public long stop()
Stop the timer

Returns:
elapsed time in milliseconds