]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Obtain current time through time() instead of through clock_gettime(CLOCK_REALTIME...
authorBart Van Assche <bvanassche@acm.org>
Fri, 16 Jan 2009 11:57:50 +0000 (11:57 +0000)
committerBart Van Assche <bvanassche@acm.org>
Fri, 16 Jan 2009 11:57:50 +0000 (11:57 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8967

drd/tests/trylock.c

index 9c6dea2790d7e5dfb91eb5ad56fa55096e0328c8..3db14edf3494fd9ed113020306842a4c00be7eff 100644 (file)
@@ -22,7 +22,9 @@ int main(int argc, char** argv)
   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);