hysteria/core/internal/congestion/bbr/clock.go
2026-02-17 17:37:20 +08:00

18 lines
370 B
Go

package bbr
import "github.com/apernet/quic-go/monotime"
// A Clock returns the current time
type Clock interface {
Now() monotime.Time
}
// DefaultClock implements the Clock interface using the Go stdlib clock.
type DefaultClock struct{}
var _ Clock = DefaultClock{}
// Now gets the current time
func (DefaultClock) Now() monotime.Time {
return monotime.Now()
}