In terms of obtaining per-thread CPU time using Posix clock_gettime(): is there any difference between using the clock ID obtained from pthread_getcpuclockid(pthread_self(),..) or using CLOCK_THREAD_CPUTIME_ID?
Asked
Active
Viewed 1,185 times
1 Answers
1
Per the man page:
NOTES
When thread refers to the calling thread, this function returns an
identifier that refers to the same clock manipulated by
clock_gettime(2) and clock_settime(2) when given the clock ID
CLOCK_THREAD_CPUTIME_ID.

phs
- 10,687
- 4
- 58
- 84
-
Thanks, that satisifies me as the OS is indeed linux. The question was prompted because I was looking at the POSIX man pages (http://pubs.opengroup.org) but didn't find any such note. I wonder if the same is true of all POSIX OS? – Steve Robbins Jan 15 '15 at 16:28