Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentTime ¶
CurrentTime return the current time calibrated using ntp server
Types ¶
type ClockStatus ¶ added in v1.10.3
type ClockStatus int
const ( ClockIsAccurate ClockStatus = iota ClockIsNotAccurate ClockInWarningRange AllNtpServersTimedOut NtpServersFailed )
func CheckLocalTimeAccurate ¶
func CheckLocalTimeAccurate(ntpServers string) (ClockStatus, error)
CheckLocalTimeAccurate returns whether the local clock accurate or not
func (ClockStatus) AllNtpServersTimedOut ¶ added in v1.10.3
func (s ClockStatus) AllNtpServersTimedOut() bool
func (ClockStatus) IsAccurate ¶ added in v1.10.3
func (s ClockStatus) IsAccurate() bool
func (ClockStatus) IsInWarningRange ¶ added in v1.10.3
func (s ClockStatus) IsInWarningRange() bool
func (ClockStatus) Message ¶ added in v1.10.3
func (s ClockStatus) Message() string
func (ClockStatus) NtpFailed ¶ added in v1.10.3
func (s ClockStatus) NtpFailed() bool
Click to show internal directories.
Click to hide internal directories.