timeutil

package
v1.106.0-cluster Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJitterToDuration

func AddJitterToDuration(d time.Duration) time.Duration

AddJitterToDuration adds up to 10% random jitter to d and returns the resulting duration.

The maximum jitter is limited by 10 seconds.

func EndOfDay

func EndOfDay(ts int64) int64

EndOfDay returns the end of the day for the given timestamp. Timestamp is in milliseconds.

func GetLocalTimezoneOffsetNsecs added in v1.97.9

func GetLocalTimezoneOffsetNsecs() int64

GetLocalTimezoneOffsetNsecs returns local timezone offset in nanoseconds.

func StartOfDay

func StartOfDay(ts int64) int64

StartOfDay returns the start of the day for the given timestamp. Timestamp is in milliseconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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