QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Return the clock ID of the CPU-time clock from a specified thread
#include <sys/types.h> #include <time.h> #include <pthread.h> extern int pthread_getcpuclockid( pthread_t id, clockid_t* clock_id);
- The ID of the thread that you want to get the clock ID for, which you can get when you call pthread_create() or pthread_self().
- A pointer to a clockid_t object where the function can store the clock ID.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_getcpuclockid() function returns the clock ID of the CPU-time clock of the thread specified by id, if the thread specified by id exists.
- An error occurred (errno is set).
- The value specified by id doesn't refer to an existing thread.