OpenBSD manual page server

Manual Page Search Parameters

PTHREAD_GETCPUCLOCKID(3) Library Functions Manual PTHREAD_GETCPUCLOCKID(3)

pthread_getcpuclockidget a clock measuring thread CPU time

#include <pthread.h>

int
pthread_getcpuclockid(pthread_t thread, clockid_t *clock_id);

The () function allows the calling thread to get a clockid_t value that measures the time spent by CPUs running in user or kernel mode on behalf of the thread specified by thread.

If successful, pthread_getcpuclockid() will return zero. Otherwise an error number will be returned to indicate the error.

pthread_getcpuclockid() will fail if:

[]
thread is an invalid thread ID.

clock_gettime(2), clock_getcpuclockid(3)

The pthread_getcpuclockid() function conforms to IEEE Std 1003.1-2008 (“POSIX.1”).

The pthread_getcpuclockid() function first appeared in and has been available since OpenBSD 5.4.

June 17, 2013 OpenBSD-5.5