org.apache.jcs.utils.timing
Class ElapsedTimer

java.lang.Object
  extended by org.apache.jcs.utils.timing.ElapsedTimer

public class ElapsedTimer
extends java.lang.Object

This is a simple timer utility.


Constructor Summary
ElapsedTimer()
           
 
Method Summary
 long getElapsedTime()
          Gets the time elapsed between the start time and now.
 java.lang.String getElapsedTimeString()
          Returns the elapsed time with the display suffix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElapsedTimer

public ElapsedTimer()
Method Detail

getElapsedTime

public long getElapsedTime()
Gets the time elapsed between the start time and now. The start time is reset to now. Subsequent calls will get the time between then and now.

Returns:
the elapsed time

getElapsedTimeString

public java.lang.String getElapsedTimeString()
Returns the elapsed time with the display suffix.

Returns:
formatted elapsed Time


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.