globaltime

package
v0.0.0-...-65dbfd8 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FixedTime time.Time

FixedTime represent a fixed moment in time. Set this variable to anything different from the default value for time.Time and the value will be returned in Now() function in place of the current time

Functions

func Now

func Now() time.Time

Now returns the current time (time.Now()) if no FixedTime has been set. Otherwise, it returns FixedTime. Use this in place of time.Now() to allow testing w/ custom time.

func Since

func Since(tm time.Time) time.Duration

Since returns the time passed since the parameter tm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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