ntp

package
Version: v0.0.0-...-c34a5e7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ntp syncs system time with NTP server.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultNTP    = "/usr/sbin/ntpdate"
	DefaultServer = "time.google.com"
)

Functions

func DefaultSync

func DefaultSync() (string, error)

DefaultSync syncs system time with NTP server.

func Sync

func Sync(ntpPath string, server string) (string, error)

Sync syncs system time with NTP server.

sudo service ntp stop
sudo ntpdate time.google.com
sudo service ntp start

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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