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

Method ClockID

phc/device.go:45–45  ·  view source on GitHub ↗

ClockID derives the clock ID from the file descriptor number - see clock_gettime(3), FD_TO_CLOCKID macros

()

Source from the content-addressed store, hash-verified

43// ClockID derives the clock ID from the file descriptor number -
44// see clock_gettime(3), FD_TO_CLOCKID macros
45func (dev *Device) ClockID() int32 { return unix.FdToClockID(int(dev.Fd())) }
46
47// Time returns time from the PTP device using the clock_gettime syscall
48func (dev *Device) Time() (time.Time, error) {

Callers 6

TimeMethod · 0.95
freqPPBFromDeviceFunction · 0.80
clockAdjFreqFunction · 0.80
clockStepFunction · 0.80
clockSetTimeFunction · 0.80
TimeAndOffsetFromDeviceFunction · 0.80

Calls 2

FdMethod · 0.95
FdToClockIDFunction · 0.92

Tested by

no test coverage detected