Discover Packages
github.com/shellhub-io/shellhub
pkg
clock
package
Version:
v0.27.0-rc.13
Opens a new window with list of versions in this module.
Published: Sep 28, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 7
Opens a new window with list of known importers.
Documentation
Documentation
¶
Now returns the current time from the package's backend. Use it rather than time.Now everywhere
but a deadline or an elapsed-time measurement, so a test can control what "now" means.
type Clock interface {
Now() time .Time
}
Clock is an interface that can provide time related functionality which allows us to test time dependent code.
DefaultBackend is used to configure the defaultBackend.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.