clock

package
v0.0.0-...-1392edb Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: AGPL-3.0 Imports: 2 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)
	After(d time.Duration) <-chan time.Time
}

Clock is for time

type MockClock

type MockClock struct {
	mock.Mock
}

MockClock is an autogenerated mock type for the Clock type

func (*MockClock) After

func (_m *MockClock) After(d time.Duration) <-chan time.Time

After provides a mock function with given fields: d

func (*MockClock) Now

func (_m *MockClock) Now() time.Time

Now provides a mock function with given fields:

func (*MockClock) Sleep

func (_m *MockClock) Sleep(d time.Duration)

Sleep provides a mock function with given fields: d

type RealClock

type RealClock struct{}

RealClock is a normal time.Time

func (RealClock) After

func (RealClock) After(d time.Duration) <-chan time.Time

After returns time.After

func (RealClock) Now

func (RealClock) Now() time.Time

Now returns time.Now

func (RealClock) Sleep

func (RealClock) Sleep(d time.Duration)

Sleep returns time.Sleep

Jump to

Keyboard shortcuts

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