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 TypeMethodDescriptionvoid
close()
Equivalent to callingsetDuration()
.double
Set 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-