utime

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package utime converts between time.Time and Unix Epoch time in 512ns time unit.

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"utime",
	"Synchronizes utime offset between userspace and datapath",

	cell.Invoke(initUtimeSync),
)

Cell initializes and manages the utime offset synchronization.

Functions

This section is empty.

Types

type UTime

type UTime uint64

Unix epoch time value on 2^9/10^9 second accuracy. This accuracy is chosen so that the timing is reasonably accurate for expiry times, but does not require 64-bit division of a monotonic clock value in the datapath, as it is a rather slow operation.

func TimeToUTime

func TimeToUTime(t time.Time) UTime

func ToUTime

func ToUTime(secs int64, nanos int) UTime

func (UTime) String

func (t UTime) String() string

func (UTime) Time

func (t UTime) Time() time.Time

Jump to

Keyboard shortcuts

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