Versions in this module Expand all Collapse all v2 v2.1.0 Jan 20, 2024 v2.0.0 Jan 18, 2024 Changes in this version + func NewClock() pkg.Clock + func NewTicker(d time.Duration) pkg.Ticker + func NewTimer(d time.Duration) pkg.Timer + func NewTimerFunc(d time.Duration, f func()) pkg.Timer + type Clock struct + func (c *Clock) After(d time.Duration) <-chan time.Time + func (c *Clock) AfterFunc(d time.Duration, f func()) pkg.Timer + func (c *Clock) Now() time.Time + func (c *Clock) Since(t time.Time) time.Duration + func (c *Clock) Sleep(d time.Duration) + func (c *Clock) Tick(d time.Duration) <-chan time.Time + func (c *Clock) Ticker(d time.Duration) pkg.Ticker + func (c *Clock) Timer(d time.Duration) pkg.Timer + func (c *Clock) Until(t time.Time) time.Duration + func (c *Clock) WithDeadline(parent context.Context, d time.Time) (context.Context, context.CancelFunc) + func (c *Clock) WithTimeout(parent context.Context, t time.Duration) (context.Context, context.CancelFunc) + type Ticker struct + func (t *Ticker) Chan() <-chan time.Time + func (t *Ticker) Reset(dur time.Duration) + func (t *Ticker) Stop() + type Timer struct + func (t *Timer) Chan() <-chan time.Time + func (t *Timer) Reset(duration time.Duration) bool + func (t *Timer) Stop() bool