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

Method Sub

phc/offset.go:160–162  ·  view source on GitHub ↗

Sub returns the estimated difference between two PHC SYS_OFFSET_PRECISE readings

(a *PTPSysOffsetPrecise)

Source from the content-addressed store, hash-verified

158
159// Sub returns the estimated difference between two PHC SYS_OFFSET_PRECISE readings
160func (precise *PTPSysOffsetPrecise) Sub(a *PTPSysOffsetPrecise) time.Duration {
161 return offsetBetweenPreciseReadings(a, precise)
162}
163
164// offsetBetweenExtendedReadings returns estimated difference between two PHC SYS_OFFSET_EXTENDED readings
165func offsetBetweenExtendedReadings(extendedA, extendedB *PTPSysOffsetExtended) (time.Duration, error) {

Callers 15

TestSysoffEstimateBasicFunction · 0.45
sysoffFromExtendedTSFunction · 0.45
SysoffFromPreciseFunction · 0.45
SysoffEstimateBasicFunction · 0.45
OffsetBetweenDevicesFunction · 0.45
validatePPSEventFunction · 0.45
PPSClockSyncFunction · 0.45
fakeSecondsFunction · 0.45
addFakeSecondZoneInfoFunction · 0.45

Calls 1

Tested by 2

TestSysoffEstimateBasicFunction · 0.36