|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.slf4j.profiler.StopWatch
public class StopWatch
A very basic @{link TimeInstrument} which can be started and stopped once and only once.
| Constructor Summary | |
|---|---|
StopWatch(String name)
|
|
| Method Summary | |
|---|---|
long |
elapsedTime()
Time elapsed between start and stop, in nanoseconds. |
String |
getName()
All time instruments are named entities. |
org.slf4j.profiler.TimeInstrumentStatus |
getStatus()
|
void |
log()
If the time instrument has an associated logger, then log information about this time instrument. |
void |
print()
Print information about this time instrument on the console. |
void |
start(String name)
Start tis time instrument. |
TimeInstrument |
stop()
Stop this time instrument. |
StopWatch |
stop(long stopTime)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StopWatch(String name)
| Method Detail |
|---|
public void start(String name)
TimeInstrument
start in interface TimeInstrumentpublic String getName()
TimeInstrument
getName in interface TimeInstrumentpublic TimeInstrument stop()
TimeInstrument
stop in interface TimeInstrumentpublic StopWatch stop(long stopTime)
public String toString()
toString in class Objectpublic final long elapsedTime()
TimeInstrument
elapsedTime in interface TimeInstrumentpublic org.slf4j.profiler.TimeInstrumentStatus getStatus()
getStatus in interface TimeInstrumentpublic void print()
TimeInstrument
print in interface TimeInstrumentpublic void log()
TimeInstrumentStopWatch instances cannot log while Profiler
instances can.
log in interface TimeInstrument
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||