Documentation ¶
Overview ¶
Package localtime provides time related funcs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultTimeSyncer ¶
func SetDefaultTimeSyncer(syncer *TimeSyncer)
SetDefaultTimeSyncer sets the global TimeSyncer.
Types ¶
type TimeSyncer ¶
type TimeSyncer struct { *logging.Logging *util.ContextDaemon // contains filtered or unexported fields }
TimeSyncer tries to sync time to time server.
func NewTimeSyncer ¶
NewTimeSyncer creates new TimeSyncer
func (*TimeSyncer) Offset ¶
func (ts *TimeSyncer) Offset() time.Duration
Offset returns the latest time offset.
Click to show internal directories.
Click to hide internal directories.