clock

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 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 Clock

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

type FakeClock

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

func NewFakeClock

func NewFakeClock(start time.Time) *FakeClock

func (*FakeClock) Now

func (f *FakeClock) Now() time.Time

func (*FakeClock) Sleep

func (f *FakeClock) Sleep(d time.Duration)

type RealClock

type RealClock struct{}

func NewClock

func NewClock() *RealClock

func (RealClock) Now

func (RealClock) Now() time.Time

func (RealClock) Sleep

func (RealClock) Sleep(d time.Duration)

Jump to

Keyboard shortcuts

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