package
Version:
v0.0.0-...-388d6c9
Opens a new window with list of versions in this module.
Published: Sep 27, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package clock provides a clock interface and a real clock implementation.
type Clock interface {
Now() time.Time
}
Clock is an interface for getting the current time.
New returns a new clock that returns the current time.
NewFakeClock returns a new fake clock.
type FakeClock struct {
}
FakeClock is a clock that returns a fake time.
Now returns the fake time.
RealClock is a clock that returns the current time.
Now returns the current time.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.