Class Gauge.Timer
java.lang.Object
io.prometheus.client.Gauge.Timer
- All Implemented Interfaces:
Closeable, AutoCloseable
- Enclosing class:
Gauge
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Equivalent to callingsetDuration().doubleSet the amount of time in seconds sinceGauge.Child.startTimer()was called.
-
Field Details
-
child
-
start
private final long start
-
-
Constructor Details
-
Timer
-
-
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
-