org.apache.commons.monitoring.stopwatches
Class CounterStopWatch

java.lang.Object
  extended by org.apache.commons.monitoring.stopwatches.CounterStopWatch
All Implemented Interfaces:
StopWatch

public class CounterStopWatch
extends Object
implements StopWatch


Field Summary
protected  AtomicInteger concurrencyCounter
           
protected  Counter counter
           
protected  long startedAt
           
protected  boolean stoped
           
protected  long stopedAt
           
 
Constructor Summary
CounterStopWatch(Counter counter)
           
 
Method Summary
protected  void doStop()
           
 long getElapsedTime()
           
protected  long nanotime()
           
 StopWatch stop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

counter

protected final Counter counter

startedAt

protected final long startedAt

concurrencyCounter

protected final AtomicInteger concurrencyCounter

stopedAt

protected long stopedAt

stoped

protected boolean stoped
Constructor Detail

CounterStopWatch

public CounterStopWatch(Counter counter)
Method Detail

nanotime

protected long nanotime()

getElapsedTime

public long getElapsedTime()
Specified by:
getElapsedTime in interface StopWatch

stop

public StopWatch stop()
Specified by:
stop in interface StopWatch

doStop

protected void doStop()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008–2013 The Apache Software Foundation. All rights reserved.