Package io.prometheus.client
Class Gauge.Timer
- java.lang.Object
-
- io.prometheus.client.Gauge.Timer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- Gauge
public static class Gauge.Timer extends Object implements Closeable
Represents an event being timed.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Equivalent to callingsetDuration().doublesetDuration()Set the amount of time in seconds sinceGauge.Child.startTimer()was called.
-
-
-
Method Detail
-
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
-
-