Timer
This class represents a stoppable instance of a StopWatch or a Timer. A Timer can only be stopped, and upon stopping, it outputs the elapsed duration to Prometheus.
Methods
Stop()
@classmethod
def Stop() - > float64
Stops the timer and records the elapsed duration to Prometheus. This method should be called when the timed operation completes.
Returns
| Type | Description |
|---|---|
float64 | The elapsed duration since the timer started, in seconds. |