Registry / testing / benbjohnson-clock

benbjohnson-clock

JSON →
library1.3.5gogounverified

Package clock provides a mockable clock interface for testing time-dependent code.

go get github.com/benbjohnson/clock
INSTALL
IMPORT
SIG · BENBJOHNSON-CLOCK
B
benbjohnson-clock
testinggov1.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

clock
github.com/benbjohnson/clock

Get current time using clock

package main import ( "fmt" "github.com/benbjohnson/clock" ) func main() { clk := clock.New() fmt.Println("Current time:", clk.Now()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.3.5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
benbjohnson-clock — go get benbjohnson-clock · libregistry