Class Gauge.Timer
java.lang.Object
org.torproject.metrics.descriptorparser.utils.Gauge.Timer
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
Gauge
Represents an event being timed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Equivalent to callingsetDuration().doubleSet the amount of time in seconds sinceGauge.Child.startTimer()was called.
-
Method Details
-
setDuration
public double setDuration()Set the amount of time in seconds sinceGauge.Child.startTimer()was called.- Returns:
- Measured duration in seconds since
Gauge.Child.startTimer()was called.
-
close
public void close()Equivalent to callingsetDuration().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-