gettime: use pthread_{set,get}specific() for TLS