MCPcopy
hub / github.com/tailscale/tailscale / SetStep

Method SetStep

tstest/clock.go:241–246  ·  view source on GitHub ↗

SetStep updates the amount that simulated time advances on every call to Now.

(d time.Duration)

Source from the content-addressed store, hash-verified

239
240// SetStep updates the amount that simulated time advances on every call to Now.
241func (c *Clock) SetStep(d time.Duration) {
242 c.init()
243 c.mu.Lock()
244 defer c.mu.Unlock()
245 c.step = d
246}
247
248// SetTimerChannelSize changes the channel size for any Timer or Ticker created
249// in the future. It does not affect those that were already created.

Callers 4

TestClockSetStepFunction · 0.95
TestSingleTickerFunction · 0.80
TestSingleTimerFunction · 0.80
TestAfterFuncFunction · 0.80

Implementers 3

DefaultClocktstime/tstime.go
StdClocktstime/tstime.go
Clocktstest/clock.go

Calls 3

initMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 4

TestClockSetStepFunction · 0.76
TestSingleTickerFunction · 0.64
TestSingleTimerFunction · 0.64
TestAfterFuncFunction · 0.64