fakeclock

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: May 21, 2015 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeTicker

func NewFakeTicker(clock clock.Clock, d time.Duration) clock.Ticker

func NewFakeTimer

func NewFakeTimer(clock *FakeClock, d time.Duration) *fakeTimer

Types

type FakeClock

type FakeClock struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFakeClock

func NewFakeClock(now time.Time) *FakeClock

func (*FakeClock) Increment

func (clock *FakeClock) Increment(duration time.Duration)

func (*FakeClock) IncrementBySeconds

func (clock *FakeClock) IncrementBySeconds(seconds uint64)

func (*FakeClock) NewTicker

func (clock *FakeClock) NewTicker(d time.Duration) clock.Ticker

func (*FakeClock) NewTimer

func (clock *FakeClock) NewTimer(d time.Duration) clock.Timer

func (*FakeClock) Now

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

func (*FakeClock) Sleep

func (clock *FakeClock) Sleep(d time.Duration)

func (*FakeClock) WatcherCount

func (clock *FakeClock) WatcherCount() int

Jump to

Keyboard shortcuts

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