node_exporter/vendor/github.com/beevik/ntp/README.md

962 B

Build Status GoDoc

ntp

The ntp package is an implementation of a Simple NTP (SNTP) client based on RFC5905. It allows you to connect to a remote NTP server and request the current time.

If all you care about is the current time according to a known remote NTP server, simply use the Time function:

time, err := ntp.Time("0.beevik-ntp.pool.ntp.org")

If you want the time as well as additional metadata about the time, use the Query function instead:

response, err := ntp.Query("0.beevik-ntp.pool.ntp.org")

To use the NTP pool in your application, please request your own vendor zone. Avoid using the [number].pool.ntp.org zone names in your applications.