There's pthread_cond_timedwait_relative_np. Looking at the implementation, pthread_cond_timedwait starts by converting the deadline to a relative timeout [1], but this is skipped if pthread_cond_timedwait_relative_np is used. Then, in the kernel, the timeout is converted back to an absolute deadline by either [2] or [3], but both of those are using Mach absolute time rather than the wall clock.
Mach absolute time is monotonic. It pauses while the system is asleep, which may or may not be what you want.
If need the timer to keep incrementing while the system is asleep, there's no way to do it directly with a timed wait, but you can use kevent with EVFILT_TIMER + NOTE_MACHTIME + NOTE_MACH_CONTINUOUS_TIME.
The context is a UDP network receiver which infers packet loss after a timeout:
https://github.com/facebook/netconsd/blob/main/threads.c#L15... https://github.com/facebook/netconsd/blob/main/worker.c#L526
Time while sleeping doesn't matter here.