time

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
	Since(time.Time) time.Duration
}

type FakeClock

type FakeClock struct {
	NowFunc   func() time.Time
	SinceFunc func(time.Time) time.Duration
}

func (FakeClock) Now

func (f FakeClock) Now() time.Time

func (FakeClock) Since

func (f FakeClock) Since(t time.Time) time.Duration

type RealClock

type RealClock struct{}

func (RealClock) Now

func (RealClock) Now() time.Time

func (RealClock) Since

func (RealClock) Since(t time.Time) time.Duration

Jump to

Keyboard shortcuts

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