X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fregression%2Fpthread_cond-smasher.c;h=337289b806e9496ffb35d0a4266d8d0eadb01778;hb=2c671f66e28ac079ae1148f5135c9a52129cc807;hp=7719ff6863a36984b1c5b975d9b532c160f47157;hpb=ac93680a83ebb2d95b22c09b772e74e96d9c3d0d;p=libc-test diff --git a/src/regression/pthread_cond-smasher.c b/src/regression/pthread_cond-smasher.c index 7719ff6..337289b 100644 --- a/src/regression/pthread_cond-smasher.c +++ b/src/regression/pthread_cond-smasher.c @@ -75,6 +75,10 @@ static void settimeout(struct timespec *ts) if (clock_gettime(CLOCK_REALTIME, ts)) t_error("clock_gettime failed: %s\n", strerror(errno)); ts->tv_nsec += 500*1000*1000; + if (ts->tv_nsec >= 1000*1000*1000) { + ts->tv_nsec -= 1000*1000*1000; + ts->tv_sec++; + } } static thread_ret client(void *arg) {