clock

package
v0.8.1 Latest Latest
Warning

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

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

Clock abstracts the time module to make it easier to test the system.

type RealClock

type RealClock struct{}

RealClock uses the time module underneath and should be used the production code.

func New

func New() RealClock

New creates a RealClock instance.

func (RealClock) Now

func (RealClock) Now() time.Time

Now returns the current local time.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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