readClockDataV2 deserializes a DataV2 from a section's 56-byte data buffer.
(buf []byte)
| 221 | |
| 222 | // readClockDataV2 deserializes a DataV2 from a section's 56-byte data buffer. |
| 223 | func readClockDataV2(buf []byte) *DataV2 { |
| 224 | return &DataV2{ |
| 225 | IngressTimeNS: int64(binary.LittleEndian.Uint64(buf[0:8])), //nolint:gosec |
| 226 | ErrorBoundNS: uint64(binary.LittleEndian.Uint32(buf[8:12])), |
| 227 | HoldoverMultiplierNS: Uint32AsFloat(binary.LittleEndian.Uint32(buf[12:16])), |
| 228 | SmearingStartS: binary.LittleEndian.Uint64(buf[16:24]), |
| 229 | UTCOffsetPreS: int16(binary.LittleEndian.Uint16(buf[24:26])), //nolint:gosec |
| 230 | UTCOffsetPostS: int16(binary.LittleEndian.Uint16(buf[26:28])), //nolint:gosec |
| 231 | ClockID: binary.LittleEndian.Uint32(buf[28:32]), |
| 232 | PHCTimeNS: int64(binary.LittleEndian.Uint64(buf[32:40])), //nolint:gosec |
| 233 | SysclockTimeNS: int64(binary.LittleEndian.Uint64(buf[40:48])), //nolint:gosec |
| 234 | CoefPPB: int64(binary.LittleEndian.Uint64(buf[48:56])), //nolint:gosec |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // StoreFBClockDataV2 writes the primary anchor section. The two sections are |
| 239 | // independent seqlock sections on separate cache lines, mirroring the C |
no test coverage detected
searching dependent graphs…