kubernetes/vendor/k8s.io/utils/clock/clock.go

type PassiveClock

type Clock

type WithTicker

type WithDelayedExecution

type WithTickerAndDelayedExecution

type Ticker

var _

type RealClock

// Now returns the current time.
func (RealClock) Now() time.Time {}

// Since returns time since the specified timestamp.
func (RealClock) Since(ts time.Time) time.Duration {}

// After is the same as time.After(d).
// This method does not allow to free/GC the backing timer before it fires. Use
// NewTimer instead.
func (RealClock) After(d time.Duration) <-chan time.Time {}

// NewTimer is the same as time.NewTimer(d)
func (RealClock) NewTimer(d time.Duration) Timer {}

// AfterFunc is the same as time.AfterFunc(d, f).
func (RealClock) AfterFunc(d time.Duration, f func()) Timer {}

// Tick is the same as time.Tick(d)
// This method does not allow to free/GC the backing ticker. Use
// NewTicker instead.
func (RealClock) Tick(d time.Duration) <-chan time.Time {}

// NewTicker returns a new Ticker.
func (RealClock) NewTicker(d time.Duration) Ticker {}

// Sleep is the same as time.Sleep(d)
// Consider making the sleep interruptible by using 'select' on a context channel and a timer channel.
func (RealClock) Sleep(d time.Duration) {}

type Timer

var _

type realTimer

// C returns the underlying timer's channel.
func (r *realTimer) C() <-chan time.Time {}

// Stop calls Stop() on the underlying timer.
func (r *realTimer) Stop() bool {}

// Reset calls Reset() on the underlying timer.
func (r *realTimer) Reset(d time.Duration) bool {}

type realTicker

func (r *realTicker) C() <-chan time.Time {}

func (r *realTicker) Stop() {}