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

Function ReadFBClockDataV2

fbclock/shmem.go:282–290  ·  view source on GitHub ↗

ReadFBClockDataV2 reads the primary anchor section. Used in tests only.

(shmp unsafe.Pointer)

Source from the content-addressed store, hash-verified

280
281// ReadFBClockDataV2 reads the primary anchor section. Used in tests only.
282func ReadFBClockDataV2(shmp unsafe.Pointer) (*DataV2, error) {
283 cData := &C.fbclock_clockdata_v2{}
284 shmpData := (*C.fbclock_shmdata_v2)(shmp)
285 res := C.fbclock_clockdata_load_data_v2(shmpData, cData)
286 if res != 0 {
287 return nil, fmt.Errorf("failed to load data: %s", strerror(res))
288 }
289 return clockDataV2FromC(cData), nil
290}
291
292// ReadFBClockDataRealtime reads the realtime anchor section. Used in tests only.
293func ReadFBClockDataRealtime(shmp unsafe.Pointer) (*DataV2, error) {

Callers 1

ReadFBClockDataFunction · 0.70

Calls 2

strerrorFunction · 0.85
clockDataV2FromCFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…