CLOCK_GETCPUCLOCKID(3)

NAME
clock_getcpuclockid - retrieve the current process's CPU-time clock

SYNOPSIS
cc [ flag ... ] file -lrt [ library ... ]

#include <time.h>

int clock_getcpuclockid(pid_t pid, clockid_t *clock_id);

DESCRIPTION
clock_getcpuclockid retrieves the clock value of the current process's CPU-time clock. The clock value is stored in clock_id. The process ID specified by pid must equal the current process.

RETURN VALUE
On success, clock_getcpuclockid returns the value 0 and places the retrieved clock value in clock_id.

On failure, clock_getcpuclockid returns the value -1 and errno is set appropriately.

ERRORS

EFAULT
    A specified memory address is outside the address range of the calling process.

ENOSYS
    The function is not supported on this implementation.

EPERM
    The requesting process is not pid.

CONFORMING TO
POSIX 1003.1b (formerly POSIX.4) as ammended by POSIX 1003.1j-2000.

SEE ALSO
clock_getres(3), clock_gettime(3), clock_nanosleep(3), pthread_getcpuclockid(3), timer_create(3), timer_delete(3), timer_settime(3), timer_gettime(3)

IEEE 1003.1b-1993 (POSIX.1b standard, formerly POSIX.4), Section 14 (Clocks and Timers).