在使用Posix clock_gettime()获取每线程CPU时间方面:使用从pthread_getcpuclockid(pthread_self(),..)获取的时钟ID或使用CLOCK_THREAD_CPUTIME_ID之间有什么区别吗?
答案 0 :(得分:1)
根据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.