ntp

package
v0.0.0-...-3aaa451 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNtpOffsetTime

func GetNtpOffsetTime() time.Duration

* GetNtpOffsetTime 获取ntp的时间差值 * * @return offSetTime time.Duration ntp时间差值

func GetNtpTime

func GetNtpTime() time.Time

* GetNtpTime 获取ntp同步之后的当前时间 * * @return ntpNowTime time.Time 同步ntp后的当前时间

func TriggerNtpSync

func TriggerNtpSync()

* TriggerNtpSync 主动触发ntp进行时间同步, 不需要等待是否执行成功的结果

func TriggerNtpSyncWaitRes

func TriggerNtpSyncWaitRes() bool

* TriggerNtpSyncWaitRes 主动触发ntp进行时间同步, 并返回触发是否成功标识 * * @return res bool 是否同步成功

func WaitSyncTimeFinish

func WaitSyncTimeFinish() bool

* WaitSyncTimeFinish 等待ntp时间同步结果 * * @return res bool 是否同步成功

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL