Documentation ¶
Overview ¶
Package clock implements facilities for working with wall clock time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { // MaxPositiveSkew is the maximum positive clock skew // with regard to a reference clock. MaxPositiveSkew time.Duration `yaml:"maxPositiveSkew"` // MaxNegativeSkew is the maximum negative clock skew // with regard to a reference clock. MaxNegativeSkew time.Duration `yaml:"maxNegativeSkew"` }
Configuration configures clock options.
func (Configuration) NewOptions ¶
func (c Configuration) NewOptions() Options
NewOptions creates a new set of options.
type Options ¶
type Options interface { // SetNowFn sets the NowFn. SetNowFn(value NowFn) Options // NowFn returns the NowFn. NowFn() NowFn // SetMaxPositiveSkew sets the maximum positive clock skew // with regard to a reference clock. SetMaxPositiveSkew(value time.Duration) Options // MaxPositiveSkew returns the maximum positive clock skew // with regard to a reference clock. MaxPositiveSkew() time.Duration // SetMaxNegativeSkew sets the maximum negative clock skew // with regard to a reference clock. SetMaxNegativeSkew(value time.Duration) Options // MaxNegativeSkew returns the maximum negative clock skew // with regard to a reference clock. MaxNegativeSkew() time.Duration }
Options represents the options for the clock.
Click to show internal directories.
Click to hide internal directories.