That stackoverflow answer is either inaccurate or incredibly outdated.  I wrote a short test program, and both CLOCK_THREAD_CPUTIME_ID and CLOCK_PROCESS_CPUTIME_ID work exactly as advertised.  Looking through the kernel sources, Linux has supported both for the entire history of the linux-2.6 git repo (which was created in 2005, from version Linux-2.6.12-rc2)

I chose CLOCK_THREAD_CPUTIME_ID because I wanted to exclude other threads from the eval_cost calculation, such as those created by the async package.