[GX] implement pthread_cond_timedwait