ntp

package
v0.0.0-...-4c8e30b Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 4

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.

Jump to

Keyboard shortcuts

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