absos

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.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 TimeSvc

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

func NewTimeSvc

func NewTimeSvc() TimeSvc

type TimeSvcMockImpl

type TimeSvcMockImpl struct {
	Time time.Time

	StopSleepingRequest chan any
	DoneSleeping        chan time.Duration
}

func NewTimeSvcMock

func NewTimeSvcMock() *TimeSvcMockImpl

func (*TimeSvcMockImpl) Add

func (svc *TimeSvcMockImpl) Add(d time.Duration)

func (*TimeSvcMockImpl) GetSleptDuration

func (svc *TimeSvcMockImpl) GetSleptDuration() time.Duration

func (*TimeSvcMockImpl) Now

func (svc *TimeSvcMockImpl) Now() time.Time

func (*TimeSvcMockImpl) Sleep

func (svc *TimeSvcMockImpl) Sleep(d time.Duration)

Jump to

Keyboard shortcuts

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