mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
15 lines
246 B
Go
15 lines
246 B
Go
package metrics
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type DurationObserver interface {
|
|
// ObserveDuration observes duration since start time
|
|
ObserveDuration(start time.Time)
|
|
}
|
|
|
|
func secondsSince(start time.Time) float64 {
|
|
return time.Since(start).Seconds()
|
|
}
|