fixed: the timeout value of pthread_cond_timedwait has to be referenced to CLOCK_REALTIME