Class Timer
Object
Timer
- All Implemented Interfaces:
Closeable
,AutoCloseable
Helper class for observing durations.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Same asobserveDuration()
.double
Records the observed duration in seconds since thisTimer
instance was created.
-
Method Details
-
observeDuration
Records the observed duration in seconds since thisTimer
instance was created.- Returns:
- the observed duration in seconds.
-
close
Same asobserveDuration()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-