func secToMS(seconds float64) float64 {
	return 1000 * seconds
}
chrony reports all float measures in seconds, while NTP and this tool operate ms
package checker
import (
	"fmt"
	"io"
	"net"
	"os"
	"path"
	"github.com/facebookincubator/ntp/protocol/chrony"
	"github.com/facebookincubator/ntp/protocol/control"
	"github.com/pkg/errors"
	log "github.com/sirupsen/logrus"
)
type chronyConn struct {
	net.Conn
	local string
}
func DialUnix(address string) (*chronyConn, error) {
	base, _ := path.Split(address)
	local := path.Join(base, fmt.Sprintf("chronyc.%d.sock", os.Getpid()))
	conn, err := net.DialUnix("unixgram",
		&net.UnixAddr{Name: local, Net: "unixgram"},
		&net.UnixAddr{Name: address, Net: "unixgram"},
	)
	if err != nil {
		return nil, err
	}
	if err := os.Chmod(local, 0666); err != nil {
		return nil, err
	}
	return &chronyConn{Conn: conn, local: local}, nil
}
func (c *chronyConn) Close() error {
	if err := os.RemoveAll(c.local); err != nil {
		return err
	}
	if err := c.Conn.Close(); err != nil {
		return err
	}
	return nil
}
type chronyClient interface {
	Communicate(packet chrony.RequestPacket) (chrony.ResponsePacket, error)
}
type ChronyCheck struct {
	Client chronyClient
}