github.com/decred/dcrlnd@v0.7.6/clock/interface.go (about) 1 package clock 2 3 import ( 4 "time" 5 ) 6 7 // Clock is an interface that provides a time functions for LND packages. 8 // This is useful during testing when a concrete time reference is needed. 9 type Clock interface { 10 // Now returns the current local time (as defined by the Clock). 11 Now() time.Time 12 13 // TickAfter returns a channel that will receive a tick after the specified 14 // duration has passed. 15 TickAfter(duration time.Duration) <-chan time.Time 16 }