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

Method readSysoffExtended

phc/device.go:85–94  ·  view source on GitHub ↗
(samples uint)

Source from the content-addressed store, hash-verified

83}
84
85func (dev *Device) readSysoffExtended(samples uint) (*PTPSysOffsetExtended, error) {
86 if isClockMonoRawSupported {
87 value, err := dev.readSysoffExtendedClockID(samples, unix.CLOCK_MONOTONIC_RAW)
88 if err == nil {
89 return value, nil
90 }
91 isClockMonoRawSupported = false
92 }
93 return dev.readSysoffExtendedClockID(samples, unix.CLOCK_REALTIME)
94}
95
96func (dev *Device) readSysoffExtendedClockID(samples uint, clockid uint32) (*PTPSysOffsetExtended, error) {
97 value, err := unix.IoctlPtpSysOffsetExtendedClock(int(dev.Fd()), clockid, samples)

Callers 2

ReadSysoffExtendedMethod · 0.95
ReadSysoffExtended1Method · 0.95

Calls 1

Tested by

no test coverage detected