Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clock ¶
type Clock func() int64
Clock is a function that returns unix time.
func NewForwardOnlyClock ¶
NewForwardOnlyClock clock that starts at init unix time and will go forward reference clock.
Use zero if initUnixTime is negative integer, else use 'referenceClock()'.
Use 'NewSystemClock()' if referenceClock is nil.
func NewNTPClock ¶
func NewNTPClock(ntpServers []string, opt ntp.QueryOptions) Clock
NewNTPClock returns clock from ntp server.
Click to show internal directories.
Click to hide internal directories.