Retracted: v1.0.0 was published accidentally. v1.0.1 contains only this retraction.
package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Mar 30, 2026
License: MIT
Opens a new window with license information.
Imports: 1
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 time abstraction so cache internals can be tested
without sleeping or time.Sleep-based races.
type Clock interface {
Now() time.Time
}
Clock is the interface used internally by cache to read the current time.
Mock is a controllable clock for tests.
Advance moves the mock clock forward by d.
Set sets the mock clock to t.
Real is the production clock, delegates to time.Now().
Source Files
¶
Click to show internal directories.
Click to hide internal directories.