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

Function NewFBClockCustom

fbclock/fbclock.go:49–58  ·  view source on GitHub ↗

NewFBClockCustom returns new FBClock wrapper with custom path

(path string)

Source from the content-addressed store, hash-verified

47
48// NewFBClockCustom returns new FBClock wrapper with custom path
49func NewFBClockCustom(path string) (*FBClock, error) {
50 cFBClock := &C.fbclock_lib{}
51 cPath := C.CString(path)
52 defer C.free(unsafe.Pointer(cPath))
53 errCode := C.fbclock_init(cFBClock, cPath)
54 if errCode != 0 {
55 return nil, fmt.Errorf("initializing FBClock: %s", strerror(errCode))
56 }
57 return &FBClock{cFBClock: cFBClock}, nil
58}
59
60// NewFBClock returns new FBClock wrapper
61func NewFBClock() (*FBClock, error) {

Callers 2

NewFBClockFunction · 0.70
NewFBClockV2Function · 0.70

Calls 1

strerrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…