1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "CLOCK_GETCPUCLOCKID" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" clock_getcpuclockid
5 clock_getcpuclockid \- access a process CPU-time clock (\fBADVANCED
12 int clock_getcpuclockid(pid_t\fP \fIpid\fP\fB, clockid_t *\fP\fIclock_id\fP\fB);
19 The \fIclock_getcpuclockid\fP() function shall return the clock ID
20 of the CPU-time clock of the process specified by
21 \fIpid\fP. If the process described by \fIpid\fP exists and the calling
22 process has permission, the clock ID of this clock shall
23 be returned in \fIclock_id\fP.
25 If \fIpid\fP is zero, the \fIclock_getcpuclockid\fP() function shall
26 return the clock ID of the CPU-time clock of the process
27 making the call, in \fIclock_id\fP.
29 The conditions under which one process has permission to obtain the
30 CPU-time clock ID of other processes are
31 implementation-defined.
34 Upon successful completion, \fIclock_getcpuclockid\fP() shall return
35 zero; otherwise, an error number shall be returned to
39 The \fIclock_getcpuclockid\fP() function shall fail if:
42 The requesting process does not have permission to access the CPU-time
43 clock for the process.
46 The \fIclock_getcpuclockid\fP() function may fail if:
49 No process can be found corresponding to the process specified by
53 \fIThe following sections are informative.\fP
59 The \fIclock_getcpuclockid\fP() function is part of the Process CPU-Time
60 Clocks option and need not be provided on all
70 \fIclock_getres\fP() , \fItimer_create\fP() , the Base
71 Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
73 Portions of this text are reprinted and reproduced in electronic form
74 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
75 -- Portable Operating System Interface (POSIX), The Open Group Base
76 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
77 Electrical and Electronics Engineers, Inc and The Open Group. In the
78 event of any discrepancy between this version and the original IEEE and
79 The Open Group Standard, the original IEEE and The Open Group Standard
80 is the referee document. The original Standard can be obtained online at
81 http://www.opengroup.org/unix/online.html .