X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fregression%2Fpthread_cond-smasher.c;h=337289b806e9496ffb35d0a4266d8d0eadb01778;hb=629dbf8282882b7c512fd317d18b19044ca628ea;hp=a1ea91852d15fe557aacfc43d2d370714492ccba;hpb=195a19665a3ff53af1e547741e80cd73d333d688;p=libc-test diff --git a/src/regression/pthread_cond-smasher.c b/src/regression/pthread_cond-smasher.c index a1ea918..337289b 100644 --- a/src/regression/pthread_cond-smasher.c +++ b/src/regression/pthread_cond-smasher.c @@ -73,8 +73,12 @@ static unsigned volatile phase; static void settimeout(struct timespec *ts) { if (clock_gettime(CLOCK_REALTIME, ts)) - t_error("clock_gettime failed: %s\n", errorstring(errno)); + 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) {