github.com/metacubex/quic-go@v0.44.1-0.20240520163451-20b689a59136/internal/congestion/clock.go (about) 1 package congestion 2 3 import "time" 4 5 // A Clock returns the current time 6 type Clock interface { 7 Now() time.Time 8 } 9 10 // DefaultClock implements the Clock interface using the Go stdlib clock. 11 type DefaultClock struct{} 12 13 var _ Clock = DefaultClock{} 14 15 // Now gets the current time 16 func (DefaultClock) Now() time.Time { 17 return time.Now() 18 }