Implementation status: to be implemented
int clock_getcpuclockid(pid_t pid, clockid_t *clock_id);
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 shall be returned in clock_id.
pid - the ID of the process of interest,
clock_id - (output value) the CPU-time clock ID of the process making the call.
If pid is zero, the function returns the clock ID of the CPU-time clock of the process making the call, in clock_id.
0 on success, error number otherwise.
EPERM] - the requesting process does not have permission to access the CPU-time clock for the process.
ESRCH] - no process can be found corresponding to the process specified by pid.
- Define the conditions under which one process has permission to obtain the CPU-time clock ID of other processes.
- Implement the function.