timexmock

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mocked

func Mocked(f func(*Implementation))

Mocked runs the provided function with timex mocked, and then restores the default implementation

Types

type Implementation

type Implementation struct {
	mock.Mock
}

Implementation is an autogenerated mock type for the Implementation type

func (*Implementation) After

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

After provides a mock function with given fields: d

func (*Implementation) AfterFunc

func (_m *Implementation) AfterFunc(d time.Duration, f func()) timex.Timer

AfterFunc provides a mock function with given fields: d, f

func (*Implementation) NewTicker

func (_m *Implementation) NewTicker(d time.Duration) timex.Ticker

NewTicker provides a mock function with given fields: d

func (*Implementation) NewTimer

func (_m *Implementation) NewTimer(d time.Duration) timex.Timer

NewTimer provides a mock function with given fields: d

func (*Implementation) Now

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

Now provides a mock function with given fields:

func (*Implementation) Since

func (_m *Implementation) Since(t time.Time) time.Duration

Since provides a mock function with given fields: t

func (*Implementation) Sleep

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

Sleep provides a mock function with given fields: d

func (*Implementation) Until

func (_m *Implementation) Until(t time.Time) time.Duration

Until provides a mock function with given fields: t

type Ticker

type Ticker struct {
	mock.Mock
}

Ticker is an autogenerated mock type for the Ticker type

func (*Ticker) C

func (_m *Ticker) C() <-chan time.Time

C provides a mock function with given fields:

func (*Ticker) Stop

func (_m *Ticker) Stop()

Stop provides a mock function with given fields:

type Timer

type Timer struct {
	mock.Mock
}

Timer is an autogenerated mock type for the Timer type

func (*Timer) C

func (_m *Timer) C() <-chan time.Time

C provides a mock function with given fields:

func (*Timer) Stop

func (_m *Timer) Stop() bool

Stop provides a mock function with given fields:

Jump to

Keyboard shortcuts

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