summary refs log tree commit diff
path: root/nptl/tst-mtx-timedlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-mtx-timedlock.c')
-rw-r--r--nptl/tst-mtx-timedlock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl/tst-mtx-timedlock.c b/nptl/tst-mtx-timedlock.c
index dcae828fb2..616db722eb 100644
--- a/nptl/tst-mtx-timedlock.c
+++ b/nptl/tst-mtx-timedlock.c
@@ -78,6 +78,11 @@ do_test (void)
   /* Tiny amount of time, to assure that if any thread finds it busy.
      It will receive thrd_timedout.  */
   wait_time.tv_nsec += 1;
+  if (wait_time.tv_nsec == 1000 * 1000 * 1000)
+    {
+      wait_time.tv_sec += 1;
+      wait_time.tv_nsec = 0;
+    }
 
   if (thrd_create (&id, child_add, NULL) != thrd_success)
     FAIL_EXIT1 ("thrd_create failed");