monotime

package
v0.0.0-...-a6d58bf Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 679

Documentation

Overview

Package monotime provides a fast monotonic clock source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Now

func Now() uint64

Now returns the current time in nanoseconds from a monotonic clock. The time returned is based on some arbitrary platform-specific point in the past. The time returned is guaranteed to increase monotonically at a constant rate, unlike time.Now() from the Go standard library, which may slow down, speed up, jump forward or backward, due to NTP activity or leap seconds.

func Since

func Since(t uint64) time.Duration

Since returns the amount of time that has elapsed since t. t should be the result of a call to Now() on the same machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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