Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Thursday, June 13, 2019
 
 

pthread_getcpuclockid(3C)

Name

pthread_getcpuclockid - access a thread CPU-time clock

Synopsis

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

int pthread_getcpuclockid(pthread_t thread_id, clockid_t *clock_id);

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 described by thread_id exists.

Return Values

On successful completion, pthread_getcpuclockid() shall return 0; otherwise an error shall be returned to indicate the error

Errors

The pthread_getcpuclockid() function may fail if:

ESRCH

The thread specified by thread_id does not exist.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

clock_getcpuclockid(3C), clock_getres(3C), timer_create(3C), attributes(7), standards(7)