If I know the TID of an arbitrary thread that is running on my system, I can easily compute its pthread cpu clock ID. But would I be able to call clock_gettime from my program and get its CPU time? My experiments suggest it's not possible, but I wasn't able to find the sources to confirm this.
If not, is there a way to get hi-res CPU time for a given thread? /proc/stat gives that information but I'd like something more accurate than jiffies.