You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
447 B
16 lines
447 B
package clock |
|
|
|
import ( |
|
"time" |
|
) |
|
|
|
// Clock is an interface that provides a time functions for LND packages. |
|
// This is useful during testing when a concrete time reference is needed. |
|
type Clock interface { |
|
// Now returns the current local time (as defined by the Clock). |
|
Now() time.Time |
|
|
|
// TickAfter returns a channel that will receive a tick after the specified |
|
// duration has passed. |
|
TickAfter(duration time.Duration) <-chan time.Time |
|
}
|
|
|