Subject: pthread_cond_timedwait() CLOCK_REALTIME, and pthread_condattr_setclock()
To: None <email@example.com>
From: Tad Hunt <firstname.lastname@example.org>
Date: 01/30/2004 13:46:47
We have an application where we need a pthread_cond_timedwait()
thad is not affected by changes to the system clock (CLOCK_REALTIME).
It appears as though there is a condition attribute defined which
can be used to change the default clock for a condition variable
from CLOCK_REALTIME to any other supported clock.
It doesn't appear as though this optional attribute is implemented
in NetBSD-current. Are there any plans to do so?
In the meantime, I've written my own clock_gettime which replaces
the one from libc and overrides the clock id passed in with
CLOCK_MONOTONIC. This works for this application, but it is nothing
more than a hack!