MCPcopy
hub / github.com/unkeyed/unkey / Now

Method Now

pkg/clock/interface.go:17–17  ·  view source on GitHub ↗

Now returns the current time. In production implementations, this returns the system time. In test implementations, this returns a controlled time that can be manipulated for testing purposes.

()

Source from the content-addressed store, hash-verified

15 // In test implementations, this returns a controlled time that
16 // can be manipulated for testing purposes.
17 Now() time.Time
18
19 // NewTicker returns a Ticker that fires every d. Production
20 // implementations delegate to time.NewTicker. Test implementations

Callers 15

GetMethod · 0.65
GetManyMethod · 0.65
SetNullMethod · 0.65
SetNullManyMethod · 0.65
SetMethod · 0.65
SetManyMethod · 0.65
RestoreMethod · 0.65
SWRMethod · 0.65
SWRManyMethod · 0.65
SWRWithFallbackMethod · 0.65
TestSimulationFunction · 0.65
NewFunction · 0.65

Implementers 4

CachedClockpkg/clock/cached_clock.go
RealClockpkg/clock/real_clock.go
TestClockpkg/clock/test_clock.go
MonotonicClockpkg/clock/monotonic_clock.go

Calls

no outgoing calls

Tested by 15

TestSimulationFunction · 0.52
TestEvery_StopBehaviorFunction · 0.52
TestEvery_JitterFunction · 0.52
TestRedisCounterDeleteFunction · 0.52
generateTestCertificateFunction · 0.52
TestParseDateFunction · 0.52
TestParseTimeFunction · 0.52
TestParseDateTimeFunction · 0.52
generateTestCertificateFunction · 0.52