|
From: <sv...@va...> - 2009-01-16 13:15:16
|
Author: bart Date: 2009-01-16 11:57:50 +0000 (Fri, 16 Jan 2009) New Revision: 8967 Log: Obtain current time through time() instead of through clock_gettime(CLOCK_REALTIME), such that this test compiles on systems that do not support CLOCK_REALTIME. Modified: trunk/drd/tests/trylock.c Modified: trunk/drd/tests/trylock.c =================================================================== --- trunk/drd/tests/trylock.c 2009-01-16 07:37:38 UTC (rev 8966) +++ trunk/drd/tests/trylock.c 2009-01-16 11:57:50 UTC (rev 8967) @@ -22,7 +22,9 @@ pthread_rwlock_t rwlock; struct timespec abs_timeout; - r = clock_gettime(CLOCK_REALTIME, &abs_timeout); assert(r == 0); + time(&abs_timeout.tv_sec); + abs_timeout.tv_nsec = 0; + abs_timeout.tv_sec += 10; r = pthread_rwlock_init(&rwlock, NULL); assert(r == 0); |