timex

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Now

func Now() time.Time

Now returns current time

Returns same as time.Now() at default but if set custom function via SetTimeNow, uses it. This is useful for testing

func SetTimeNow

func SetTimeNow(f NowFunc)

SetTimeNow sets custom function to change behavior of Now()

Types

type NowFunc

type NowFunc func() time.Time

NowFunc is a type of SetTimeNow argument

Jump to

Keyboard shortcuts

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