pthread_getcpuclockid
extern int pthread_getcpuclockid(pthread_t thread_id, clockid_t* clock_id);
if (pthread_getcpuclockid(t, &c) != 0)