5 pthread_mutex_t mutex
= PTHREAD_MUTEX_INITIALIZER
;
6 pthread_cond_t cond
= PTHREAD_COND_INITIALIZER
;
8 // This time has most definitely passed already. (Epoch)
10 memset(&now
, 0, sizeof(now
));
12 pthread_mutex_lock(&mutex
);
13 pthread_cond_timedwait(&cond
, &mutex
, &now
);
14 pthread_mutex_unlock(&mutex
);
16 pthread_mutex_destroy(&mutex
);
17 pthread_cond_destroy(&cond
);