Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Now() time.Time
Since(t time.Time) time.Duration
NewTicker(d time.Duration) Ticker
NewTimer(d time.Duration) Timer
}
Backend provides primitive clock functions.
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock implements a clock. The zero value is valid and uses the real time functions.
func (Clock) NewLazyTimer ¶
func (Clock) NewTicker ¶
NewTicker provides functionality equivalent to time.NewTicker. It is safe to call on a zero value.
func (Clock) NewTimer ¶
NewTimer provides functionality equivalent to time.NewTimer. It is safe to call on a zero value.
func (Clock) Now ¶
Now provides functionality equivalent to time.Now. It is safe to call on a zero value.
Click to show internal directories.
Click to hide internal directories.