Cpu time CLOCK_THREAD_CPUTIME_ID是否与pthread_getcpuclockid(pthread_self(),…)相同?
在使用Posix clock_gettime()获取每个线程的CPU时间方面:使用从pthread_getcpuclockid(pthread_self(),…)获取的时钟ID与使用clock_thread_CPUTIME_ID之间有什么区别吗?Cpu time CLOCK_THREAD_CPUTIME_ID是否与pthread_getcpuclockid(pthread_self(),…)相同?,cpu-time,Cpu Time,在使用Posix clock_gettime()获取每个线程的CPU时间方面:使用从pthread_getcpuclockid(pthread_self(),…)获取的时钟ID与使用clock_thread_CPUTIME_ID之间有什么区别吗? 谢谢,这让我很满意,因为操作系统确实是linux。这个问题被提示是因为我正在查看POSIX手册页(),但没有找到任何这样的注释。我想知道是否所有POSIX操作系统都是如此? NOTES When thread refers to the cal
谢谢,这让我很满意,因为操作系统确实是linux。这个问题被提示是因为我正在查看POSIX手册页(),但没有找到任何这样的注释。我想知道是否所有POSIX操作系统都是如此?
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.