clock

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: GPL-3.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 return current time
	Now() time.Time
}

Clock is an interface to ease unit testing

type SystemClock

type SystemClock struct {
}

SystemClock is a clock that use system time

func (*SystemClock) Now

func (clock *SystemClock) Now() time.Time

Now return now from system clock

Jump to

Keyboard shortcuts

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