package digclock

Import Path
	go.uber.org/dig/internal/digclock (on go.dev)

Dependency Relation
	imports one package, and imported by one package

Involved Source Files clock.go
Package-Level Type Names (total 2)
/* sort by: | */
Clock defines how dig accesses time. ( Clock) Now() time.Time ( Clock) Since(time.Time) time.Duration *Mock go.uber.org/fx/internal/fxclock.Clock (interface) *go.uber.org/fx/internal/fxclock.Mock github.com/benbjohnson/clock.Clock (interface) *github.com/benbjohnson/clock.Mock github.com/libp2p/go-libp2p/p2p/host/autorelay.ClockWithInstantTimer (interface) github.com/libp2p/go-libp2p/p2p/host/autorelay.RealClock github.com/libp2p/go-libp2p/p2p/net/swarm.Clock (interface) github.com/libp2p/go-libp2p/p2p/net/swarm.RealClock Clock : github.com/hibiken/asynq/internal/timeutil.Clock Clock : github.com/pion/stun.Clock Clock : github.com/pion/stun/v3.Clock Clock : github.com/quic-go/quic-go/internal/congestion.Clock var System
Mock is a fake source of time. It implements standard time operations, but allows the user to control the passage of time. Use the [Mock.Add] method to progress time. Note that this implementation is not safe for concurrent use. Add progresses time by the given duration. It panics if the duration is negative. Now returns the current time. Since returns the time elapsed since the given time. *Mock : Clock *Mock : github.com/hibiken/asynq/internal/timeutil.Clock *Mock : github.com/pion/stun.Clock *Mock : github.com/pion/stun/v3.Clock *Mock : github.com/quic-go/quic-go/internal/congestion.Clock func NewMock() *Mock
Package-Level Functions (only one)
NewMock creates a new mock clock with the current time set to the current time.
Package-Level Variables (only one)
System is the default implementation of Clock based on real time.