timex

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Clock     clock.Clock
	IsTesting bool
	Maxtime   = time.Date(9999, time.December, 31, 23, 59, 59, 999999999, time.UTC)
)

Functions

func Add

func Add(d time.Duration)

func After added in v2.0.4

func After(duration time.Duration) <-chan time.Time

func GetNow

func GetNow() time.Time

func GetNowInMilli

func GetNowInMilli() int64

func GetTicker

func GetTicker(duration time.Duration) *clock.Ticker

GetTicker Time related. For Mock

func GetTimer

func GetTimer(duration time.Duration) *clock.Timer

func GetTimerByTime

func GetTimerByTime(t time.Time) *clock.Timer

func InitClock

func InitClock()

func Set

func Set(t int64)

func SetNow added in v2.2.0

func SetNow(t time.Time)

func Sleep

func Sleep(duration time.Duration)

Types

This section is empty.

Jump to

Keyboard shortcuts

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