NULL); pthread_mutex_init(&mutex, NULL); while(1) { pthread_mutex_lock(&mutex); time_t begin = time(NULL); pthread_cond_timedwait_relative_np(&cond