pthread_getcpuclockid

Synopsis

#include <pthread.h>
#include <time.h>

int pthread_getcpuclockid(pthread_t thread_id, clockid_t *clock_id);

Status

Implemented

Conformance

IEEE Std 1003.1-2017

Description

The pthread_getcpuclockid() function shall return in clock_id the clock ID of the CPU-time clock of the thread specified by thread_id, if the thread specified by thread_id exists.

The returned clock ID can be used with clock_gettime() to read the CPU time consumed by the thread.

Return value

Upon successful completion, pthread_getcpuclockid() shall return zero; otherwise, an error number shall be returned to indicate the error.

Errors

No errors are defined.

POSIX deviations

No POSIX deviations discovered.