1CLOCK_GETCPUCLOCKID(P)     POSIX Programmer's Manual    CLOCK_GETCPUCLOCKID(P)
2
3
4

NAME

6       clock_getcpuclockid  -  access a process CPU-time clock (ADVANCED REAL‐
7       TIME)
8

SYNOPSIS

10       #include <time.h>
11
12       int clock_getcpuclockid(pid_t pid, clockid_t *clock_id);
13
14

DESCRIPTION

16       The clock_getcpuclockid() function shall return the  clock  ID  of  the
17       CPU-time  clock  of  the  process  specified  by  pid.  If  the process
18       described by pid exists and the calling  process  has  permission,  the
19       clock ID of this clock shall be returned in clock_id.
20
21       If  pid  is  zero,  the clock_getcpuclockid() function shall return the
22       clock ID of the CPU-time clock of  the  process  making  the  call,  in
23       clock_id.
24
25       The  conditions  under  which  one process has permission to obtain the
26       CPU-time clock ID of other processes are implementation-defined.
27

RETURN VALUE

29       Upon successful completion, clock_getcpuclockid()  shall  return  zero;
30       otherwise, an error number shall be returned to indicate the error.
31

ERRORS

33       The clock_getcpuclockid() function shall fail if:
34
35       EPERM  The  requesting  process  does not have permission to access the
36              CPU-time clock for the process.
37
38
39       The clock_getcpuclockid() function may fail if:
40
41       ESRCH  No process can be found corresponding to the  process  specified
42              by pid.
43
44
45       The following sections are informative.
46

EXAMPLES

48       None.
49

APPLICATION USAGE

51       The  clock_getcpuclockid()  function  is  part  of the Process CPU-Time
52       Clocks option and need not be provided on all implementations.
53

RATIONALE

55       None.
56

FUTURE DIRECTIONS

58       None.
59

SEE ALSO

61       clock_getres() ,  timer_create()  ,  the  Base  Definitions  volume  of
62       IEEE Std 1003.1-2001, <time.h>
63
65       Portions  of  this text are reprinted and reproduced in electronic form
66       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
67       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
68       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
69       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
70       event of any discrepancy between this version and the original IEEE and
71       The  Open Group Standard, the original IEEE and The Open Group Standard
72       is the referee document. The original Standard can be  obtained  online
73       at http://www.opengroup.org/unix/online.html .
74
75
76
77IEEE/The Open Group                  2003               CLOCK_GETCPUCLOCKID(P)
Impressum