[Previous] [Contents] [Next]

clock_getcpuclockid()

Return the clock ID of the CPU-time clock from a specified process

Synopsis:

#include <sys/types.h>
#include <time.h>

extern int clock_getcpuclockid( 
                       pid_t pid,
                       clockid_t* clock_id );

Library:

libc

Description:

The clock_getcpuclockid() function returns the clock ID of the CPU-time clock of the process specified by pid. If the process described by pid exists and the calling process has permission, the clock ID of this clock is returned in clock_id.

If pid is zero, the clock ID of the CPU-time clock of the process marking the call is returned in clock_id.

A process always has permission to obtain the CPU-time clock ID of another process.

Returns:

Zero for success, or an error value.

Errors:

ESRCH
No process can be found corresponding to the specified pid.

Classification:

POSIX 1003.1d (draft)

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

clock_getres(), clock_gettime(), Clockid(), clock_settime(), pthread_getcpulockid(), timer_create()


[Previous] [Contents] [Next]