NewFBClockCustom returns new FBClock wrapper with custom path
(path string)
| 47 | |
| 48 | // NewFBClockCustom returns new FBClock wrapper with custom path |
| 49 | func 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 |
| 61 | func NewFBClock() (*FBClock, error) { |
no test coverage detected
searching dependent graphs…