CLOCK_THREAD_CPUTIME_ID is a linux-specific timer. On NetBSD, the best way to get timer information appears to be getrusage, which happens to be fairly cross-platform.