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

Function init

internal/utils/fasttime/time_fast.go:15–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13var sharedFastTime = NewFastTime()
14
15func init() {
16 if !teaconst.IsMain {
17 return
18 }
19
20 var ticker = time.NewTicker(200 * time.Millisecond)
21 goman.New(func() {
22 for range ticker.C {
23 sharedFastTime = NewFastTime()
24 }
25 })
26}
27
28func Now() *FastTime {
29 return sharedFastTime

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
NewFastTimeFunction · 0.85

Tested by

no test coverage detected