MCPcopy Index your code
hub / github.com/tailscale/tailscale / NewClock

Function NewClock

tstest/clock.go:55–61  ·  view source on GitHub ↗

NewClock creates a Clock with the specified settings. To create a Clock with only the default settings, new(Clock) is equivalent, except that the start time will not be computed until one of the receivers is called.

(co ClockOpts)

Source from the content-addressed store, hash-verified

53// Clock with only the default settings, new(Clock) is equivalent, except that
54// the start time will not be computed until one of the receivers is called.
55func NewClock(co ClockOpts) *Clock {
56 if co.FollowRealTime && co.Step != 0 {
57 panic("only one of FollowRealTime and Step are allowed in NewClock")
58 }
59
60 return newClockInternal(co, nil)
61}
62
63// newClockInternal creates a Clock with the specified settings and allows
64// specifying a non-standard realTimeClock.

Calls 1

newClockInternalFunction · 0.85

Tested by 15

testControlHTTPFunction · 0.74
TestStdHandlerFunction · 0.74
TestEgressPodReadinessFunction · 0.74
TestLoadBalancerClassFunction · 0.74
TestAnnotationsFunction · 0.74
TestAnnotationIntoLBFunction · 0.74
TestLBIntoAnnotationFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…