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

Function reader_thread

fbclock/cpp_test/test.cpp:88–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 data.holdover_multiplier_ns = data.ingress_time_ns * 3;
87 }
88 return 0;
89}
90
91int reader_thread(fbclock_shmdata* shmp, int tries) {
92 int err;
93 fbclock_clockdata data;
94 for (int i = 0; i < tries; i++) {
95 err = fbclock_clockdata_load_data(shmp, &data);
96 if (err != 0) {
97 return err;
98 }
99 if (data.ingress_time_ns * 2 != data.error_bound_ns) {
100 printf("ingress_time_ns: %lu\n", data.ingress_time_ns);
101 printf("error_bound_ns: %d\n", data.error_bound_ns);
102 printf("holdover_multiplier_ns: %d\n", data.holdover_multiplier_ns);
103 return -1;
104 }
105 if (data.ingress_time_ns * 3 != data.holdover_multiplier_ns) {
106 printf("ingress_time_ns: %lu\n", data.ingress_time_ns);
107 printf("error_bound_ns: %d\n", data.error_bound_ns);
108 printf("holdover_multiplier_ns: %d\n", data.holdover_multiplier_ns);
109 return -1;
110 }
111 }
112 return 0;
113}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…