MCPcopy
hub / github.com/riverqueue/river / Now

Method Now

rivertype/time_generator.go:19–19  ·  view source on GitHub ↗

Now returns the current time. This may be a stubbed time if the time has been actively stubbed in a test. Production implementations should preserve Go's monotonic clock reading from time.Now for in-process duration and deadline math. Do not normalize through `t.UTC()` here: per the time package's

()

Source from the content-addressed store, hash-verified

17 // changing location strips the monotonic reading. Normalize at database or
18 // serialization boundaries instead.
19 Now() time.Time
20
21 // NowOrNil returns the currently stubbed time if the current time is
22 // stubbed, and nil otherwise.

Implementers 3

UnStubbableTimeGeneratorrivershared/baseservice/base_service.g
TimeStubrivershared/riversharedtest/rivershare
localNowTimeGeneratorStubinternal/leadership/elector_test.go

Calls

no outgoing calls