MCPcopy Create free account
hub / github.com/facebook/time / leapSeconds

Function leapSeconds

fbclock/daemon/daemon.go:150–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 smearingStartS uint64 // time (TAI) when smearing starts
149 smearingEndS uint64 // time (TAI) when smearing ends
150 utcOffsetPreS int32 // DTAI offset prior to Leap Second Event Time
151 utcOffsetPostS int32 // DTAI offset post Leap Second Event Time
152}
153
154func leapSeconds() ([]leapsectz.LeapSecond, error) {
155 leaps, err := leapsectz.Parse("")
156 if err != nil {
157 return []leapsectz.LeapSecond{}, err
158 }
159 if len(leaps) < 2 {
160 return []leapsectz.LeapSecond{}, fmt.Errorf("not enough leap seconds in the file")
161 }
162
163 previousLeap := leaps[len(leaps)-2]
164 latestLeap := leaps[len(leaps)-1]
165
166 return []leapsectz.LeapSecond{previousLeap, latestLeap}, nil

Callers 1

doWorkMethod · 0.85

Calls 1

ParseFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…