MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / NewTicker

Function NewTicker

internal/utils/ticker.go:19–26  ·  view source on GitHub ↗

NewTicker 创建新Ticker

(duration time.Duration)

Source from the content-addressed store, hash-verified

17
18// NewTicker 创建新Ticker
19func NewTicker(duration time.Duration) *Ticker {
20 raw := time.NewTicker(duration)
21 return &Ticker{
22 raw: raw,
23 C: raw.C,
24 done: make(chan zero.Zero, 1),
25 }
26}
27
28// Next 查找下一个Tick
29func (this *Ticker) Next() bool {

Callers 10

StartMethod · 0.92
StartMethod · 0.92
initListMethod · 0.92
initPurgeTickerMethod · 0.92
initPurgeTickerMethod · 0.92
servePacketListenerMethod · 0.92
TestTickerFunction · 0.85
TestTicker2Function · 0.85
TestTicker_StopTwiceFunction · 0.85
EveryFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestTickerFunction · 0.68
TestTicker2Function · 0.68
TestTicker_StopTwiceFunction · 0.68