clock

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultClock

type DefaultClock struct{}

func New

func New() *DefaultClock

New returns a new clock that runs on system time.

func (*DefaultClock) Now

func (*DefaultClock) Now() time.Time

type StaticClock

type StaticClock struct {
	// contains filtered or unexported fields
}

func Static

func Static(time time.Time) *StaticClock

Static returns a new clock that always returns the given static value.

func (*StaticClock) Now

func (c *StaticClock) Now() time.Time

Jump to

Keyboard shortcuts

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