Package org.slf4j.profiler
Class StopWatch
java.lang.Object
org.slf4j.profiler.StopWatch
- All Implemented Interfaces:
- TimeInstrument
A very basic 
TimeInstrument which can be started and stopped
 once and only once.- Author:
- Ceki Gülcü
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal longTime elapsed between start and stop, in nanoseconds.getName()All time instruments are named entities.org.slf4j.profiler.TimeInstrumentStatusvoidlog()If the time instrument has an associated logger, then log information about this time instrument.voidprint()Print information about this time instrument on the console.voidStart this time instrument.stop()Stop this time instrument.stop(long stopTime) toString()
- 
Constructor Details- 
StopWatch
 
- 
- 
Method Details- 
startDescription copied from interface:TimeInstrumentStart this time instrument.- Specified by:
- startin interface- TimeInstrument
- Parameters:
- name- the name of this instrument
 
- 
getNameDescription copied from interface:TimeInstrumentAll time instruments are named entities.- Specified by:
- getNamein interface- TimeInstrument
- Returns:
- the name of this instrument
 
- 
stopDescription copied from interface:TimeInstrumentStop this time instrument.- Specified by:
- stopin interface- TimeInstrument
- Returns:
- this
 
- 
stop
- 
toString
- 
elapsedTimeDescription copied from interface:TimeInstrumentTime elapsed between start and stop, in nanoseconds.- Specified by:
- elapsedTimein interface- TimeInstrument
- Returns:
- time elapsed in nanoseconds
 
- 
getStatus- Specified by:
- getStatusin interface- TimeInstrument
 
- 
printDescription copied from interface:TimeInstrumentPrint information about this time instrument on the console.- Specified by:
- printin interface- TimeInstrument
 
- 
logDescription copied from interface:TimeInstrumentIf the time instrument has an associated logger, then log information about this time instrument. Note thatStopWatchinstances cannot log whileProfilerinstances can.- Specified by:
- login interface- TimeInstrument
 
 
-