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

Interface DeviceController

phc/pps_source.go:80–90  ·  view source on GitHub ↗

DeviceController defines a subset of functions to interact with a phc device. Enables mocking.

Source from the content-addressed store, hash-verified

78
79// DeviceController defines a subset of functions to interact with a phc device. Enables mocking.
80type DeviceController interface {
81 Time() (time.Time, error)
82 setPinFunc(index uint, pf int, ch uint) error
83 setPTPPerout(req *PtpPeroutRequest) error
84 File() *os.File
85 AdjFreq(freq float64) error
86 Step(offset time.Duration) error
87 Read(buf []byte) (int, error)
88 Fd() uintptr
89 extTTSRequest(req *PtpExttsRequest) error
90}
91
92// PPSPoller represents a device which can be polled for PPS events
93type PPSPoller interface {

Implementers 2

MockDeviceControllerphc/pps_mock_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…