Documentation
¶
Index ¶
- Variables
- func After(d time.Duration) <-chan time.Time
- func Notify(c chan<- TimeTravelEvent) func()
- func Now() time.Time
- func RemainingDuration(from time.Time, nonScaledDuration time.Duration) time.Duration
- func ScaledDuration(d time.Duration) time.Duration
- func SetSpeed(s float64) func()
- func SetTime(target time.Time, opt Option) func()
- func Since(start time.Time) time.Duration
- func Sleep(d time.Duration)
- type Option
- type TestTicker
- type Ticker
- type TimeTravelEvent
- type Timeline
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Notify ¶ added in v0.154.0
func Notify(c chan<- TimeTravelEvent) func()
func RemainingDuration ¶
Types ¶
type TestTicker ¶ added in v0.178.1
func NewTestTicker ¶ added in v0.178.1
func NewTestTicker(d time.Duration) *TestTicker
func (*TestTicker) Reset ¶ added in v0.178.1
func (t *TestTicker) Reset(d time.Duration)
func (*TestTicker) Stop ¶ added in v0.178.1
func (t *TestTicker) Stop()
Stop turns off a ticker. After Stop, no more ticks will be sent. Stop does not close the channel, to prevent a concurrent goroutine reading from the channel from seeing an erroneous "tick".
type Ticker ¶ added in v0.160.0
Ticker helps enable us to switch freely between time.Ticker and clock's Ticker implementation.
type TimeTravelEvent ¶ added in v0.160.0
func Check ¶ added in v0.160.0
func Check() (TimeTravelEvent, bool)
Click to show internal directories.
Click to hide internal directories.