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

21 lines
641 B
Markdown
Raw Normal View History

[![Build Status](https://travis-ci.org/beevik/ntp.svg?branch=master)](https://travis-ci.org/beevik/ntp)
[![GoDoc](https://godoc.org/github.com/beevik/ntp?status.svg)](https://godoc.org/github.com/beevik/ntp)
ntp
===
2017-02-28 22:59:37 +01:00
The ntp package is an implementation of a simple NTP client. It allows you
to connect to a remote NTP server and request the current time.
2017-02-28 22:59:37 +01:00
To request the current time using version 4 of the NTP protocol, simply do the
following:
```go
time, err := ntp.Time("0.pool.ntp.org")
```
2017-02-28 22:59:37 +01:00
To request the current time along with additional metadata, use the Query
function:
```go
response, err := ntp.Query("0.pool.ntp.org", 4)
```