MCPcopy Create free account
hub / github.com/aws/clock-bound / new

Method new

test/clock-bound-phc-offset/src/phc.rs:96–104  ·  view source on GitHub ↗

Constructs a `PhcReader` struct using the specified PHC device file and PHC CEB file path. Should not be called directly - used by autoconfiguration function.

(phc_device_file: File, phc_clock_error_bound_path: PathBuf)

Source from the content-addressed store, hash-verified

94impl PhcReader {
95 /// Constructs a `PhcReader` struct using the specified PHC device file and PHC CEB file path.
96 /// Should not be called directly - used by autoconfiguration function.
97 pub fn new(phc_device_file: File, phc_clock_error_bound_path: PathBuf) -> Self {
98 let ptp_reader = PtpReader::new(&phc_device_file);
99 let ceb_reader = PhcClockErrorBoundReader::new(phc_clock_error_bound_path);
100 Self {
101 _phc_device_file: phc_device_file,
102 ptp_reader,
103 ceb_reader,
104 }
105 }
106
107 /// Retrieves a timestamp from the PHC device.

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected