posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
_POSIX_THREAD_CPUTIME

POSIX Thread CPU-Time Clocks option. More...

Macros

#define CLOCK_THREAD_CPUTIME_ID   ((clockid_t)3)
 CPU-time clock for the calling thread.
 

Functions

int pthread_getcpuclockid (pthread_t thread_id, clockid_t *clock_id)
 Get the CPU-time clock of a thread.
 

Detailed Description

POSIX Thread CPU-Time Clocks option.

Macro Definition Documentation

◆ CLOCK_THREAD_CPUTIME_ID

#define CLOCK_THREAD_CPUTIME_ID   ((clockid_t)3)

CPU-time clock for the calling thread.

Definition at line 129 of file time.h.

Function Documentation

◆ pthread_getcpuclockid()

int pthread_getcpuclockid ( pthread_t  thread_id,
clockid_t clock_id 
)

Get the CPU-time clock of a thread.

Parameters
thread_idThread whose CPU-time clock to retrieve.
clock_idOutput: clock ID for the thread.
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getcpuclockid.html