net.sourceforge.domian.util
Class StopWatch

java.lang.Object
  extended by net.sourceforge.domian.util.StopWatch

public class StopWatch
extends java.lang.Object

Nanosecond stop watch with some timely overhead... This class is not thread-safe.

Since:
0.3
Author:
Eirik Torske

Constructor Summary
StopWatch()
           
 
Method Summary
 java.lang.String elapsedTimeToString()
           
 long getElapsedTime()
           
 long getLapTime()
           
 net.sourceforge.domian.util.StopWatch.State getState()
           
 java.lang.String lapTimeToString()
           
static java.lang.String print(long elapsedTime)
          NB!
 StopWatch reset()
           
 StopWatch start()
           
 StopWatch stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StopWatch

public StopWatch()
Method Detail

getState

public net.sourceforge.domian.util.StopWatch.State getState()

reset

public StopWatch reset()

start

public StopWatch start()

stop

public StopWatch stop()

getElapsedTime

public long getElapsedTime()

getLapTime

public long getLapTime()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

elapsedTimeToString

public java.lang.String elapsedTimeToString()

lapTimeToString

public java.lang.String lapTimeToString()

print

public static java.lang.String print(long elapsedTime)
NB! Rounding mode is plain flooring.



Copyright © 2006-2010. All Rights Reserved.