com.netflix.servo.monitor
Interface Stopwatch

All Known Implementing Classes:
BasicStopwatch

public interface Stopwatch

Measures the time taken for execution of some code.


Method Summary
 long getDuration()
          Returns the duration in nanoseconds.
 long getDuration(java.util.concurrent.TimeUnit timeUnit)
          Returns the duration in the specified time unit.
 void reset()
          Reset the stopwatch so that it can be used again.
 void start()
          Mark the start time.
 void stop()
          Mark the end time.
 

Method Detail

start

void start()
Mark the start time.


stop

void stop()
Mark the end time.


reset

void reset()
Reset the stopwatch so that it can be used again.


getDuration

long getDuration(java.util.concurrent.TimeUnit timeUnit)
Returns the duration in the specified time unit.


getDuration

long getDuration()
Returns the duration in nanoseconds.