package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Functions

NewClock constructs a Clock value from a genesis timestamp (t) and a Genesis Validator Root (vr).
NewClockSynchronizer initializes a single instance of ClockSynchronizer that must be used by all ClockWaiters that need to be synchronized to a ClockSetter (ie blockchain service).
WithNower allows tests in particular to inject an alternate implementation of time.Now (vs using system time).

# Structs

Clock abstracts important time-related concerns in the beacon chain: - provides a time.Now() construct that can be overridden in tests - GenesisTime() to know the genesis time or use genesis time determination as a synchronization point.
ClockSynchronizer provides a synchronization mechanism for services that rely on the genesis time and validator root being known before getting to work.

# Interfaces

ClockSetter specifies the SetClock method.
ClockWaiter specifies the WaitForClock method.

# Type aliases

ClockOpt is a functional option to change the behavior of a clock value made by NewClock.
Nower is a function that can return the current time.