|
OS_DEBUG("failed in clock_getres: %s\n", strerror(status)); |
From clock_getres man pages:
clock_gettime(), clock_settime() and clock_getres() return 0 for success, or -1 for failure (in which case errno is set appropriately).
The return value of clock_getres() is just 0 or -1. If it returns -1 in the event of a failure, it sets errno, so the OS_DEBUG line should use strerror(errno), not strerror(status), otherwise it always reports:
OS_Posix_TimeBaseAPI_Impl_Init():222:failed in clock_getres: Unknown error -1