Discover Packages
codeberg.org/saturn-sync/saturn
pkg
clock
package
Version:
v0.50.0
Opens a new window with list of versions in this module.
Published: Feb 17, 2026
License: AGPL-3.0
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
Documentation
¶
type Clock interface {
Now() time .Time
}
Clock defines methods of a clock.
Fake fakes the clock.
Useful in tests.
func NewFakeDefault() *Fake
NewFakeDefault returns Fake initialized at 2000-01-01T00:00:00Z.
Add advances the fake clock by d.
It is safe to call this method from multiple goroutines.
Now fakes the current time.
It returns whatever base value to clock currently contains.
It increases the base value by one second for each call
to make it possible to check a sequence of calls.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.