ntp

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ntp provides conversion methods between time.Time and NTP timestamps stored in uint64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToNTP

func ToNTP(t time.Time) uint64

ToNTP converts a time.Time oboject to an uint64 NTP timestamp.

func ToNTP32 added in v0.1.38

func ToNTP32(t time.Time) uint32

ToNTP32 converts a time.Time object to a uint32 NTP timestamp.

func ToTime

func ToTime(t uint64) time.Time

ToTime converts a uint64 NTP timestamps to a time.Time object.

func ToTime32 added in v0.1.38

func ToTime32(t uint32, reference time.Time) time.Time

ToTime32 converts a uint32 NTP timestamp to a time.Time object, using the highest 16 bit of the reference to recover the lost bits. The low 16 bits are not recovered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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