clock

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 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
}

Clock knows how to get the current time. It can be used to fake out timing for testing.

type Real

type Real struct{}

func (Real) Now

func (Real) Now() time.Time

Now returns the current time

type Test

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

func NewTest

func NewTest(t time.Time) Test

func (Test) Now

func (tc Test) Now() time.Time

Now returns the the current time

Jump to

Keyboard shortcuts

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