}
/* Wait */
- tvh_cond_timedwait(>imer_cond, &global_lock, (intptr_t )&ts);
+ tvh_cond_timedwait_ts(>imer_cond, &global_lock, &ts);
tvh_mutex_unlock(&global_lock);
}
}
*/
r = 0;
#else
- r = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
- if (r) {
- fprintf(stderr, "Unable to set monotonic clocks for conditions! (%d)", r);
- abort();
+ if (monotonic) {
+ r = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ if (r) {
+ fprintf(stderr, "Unable to set monotonic clocks for conditions! (%d)", r);
+ abort();
+ }
}
#endif
return pthread_cond_init(&cond->cond, &attr);