projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
974c16d
)
fix timeout calc in pthread_cond-smasher
author
Szabolcs Nagy
<nsz@port70.net>
Mon, 18 Aug 2014 06:33:23 +0000
(08:33 +0200)
committer
Szabolcs Nagy
<nsz@port70.net>
Mon, 18 Aug 2014 06:33:23 +0000
(08:33 +0200)
src/regression/pthread_cond-smasher.c
patch
|
blob
|
history
diff --git
a/src/regression/pthread_cond-smasher.c
b/src/regression/pthread_cond-smasher.c
index
7719ff6
..
337289b
100644
(file)
--- 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) {