The pthread_mutex_timedlock documentation says that abs_timeout takes a CLOCK_REALTIME. However, we all know that it is inappropriate for timing a spec
abs_timeout
CLOCK_REALTIME
On OS X and FreeBSD, you can use kqueue and kevent. See my answer here: https://stackoverflow.com/a/31174803/432
kqueue
kevent