clockcode.cloudfoundry.org/clock/fakeclock Index | Files

package fakeclock

import "code.cloudfoundry.org/clock/fakeclock"

Index

Types

type FakeClock

type FakeClock struct {
	// contains filtered or unexported fields
}

func NewFakeClock

func NewFakeClock(now time.Time) *FakeClock

func (*FakeClock) After

func (clock *FakeClock) After(d time.Duration) <-chan time.Time

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) Since

func (clock *FakeClock) Since(t time.Time) time.Duration

func (*FakeClock) Sleep

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

func (*FakeClock) WaitForNWatchersAndIncrement

func (clock *FakeClock) WaitForNWatchersAndIncrement(duration time.Duration, numWatchers int)

func (*FakeClock) WaitForWatcherAndIncrement

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

func (*FakeClock) WatcherCount

func (clock *FakeClock) WatcherCount() int

Source Files

fake_clock.go fake_ticker.go fake_timer.go package.go

Version
v1.28.0 (latest)
Published
Jan 7, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
2 months ago

Tools for package owners.