Timer is a stoppable instance of a StopWatch or a Timer A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus
| 125 | // Timer is a stoppable instance of a StopWatch or a Timer |
| 126 | // A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus |
| 127 | type Timer struct { |
| 128 | start time.Time |
| 129 | outputScale time.Duration |
| 130 | timer prometheus.Observer |
| 131 | } |
| 132 | |
| 133 | // Stop observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch |
| 134 | func (s Timer) Stop() float64 { |
nothing calls this directly
no outgoing calls
no test coverage detected