aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-sem5.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-sem5.c')
-rw-r--r--nptl/tst-sem5.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/nptl/tst-sem5.c b/nptl/tst-sem5.c
index cb85b8e..d3ebe26 100644
--- a/nptl/tst-sem5.c
+++ b/nptl/tst-sem5.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -73,6 +73,20 @@ do_test (void)
return 1;
}
+ struct timespec ts2;
+ if (clock_gettime (CLOCK_REALTIME, &ts2) != 0)
+ {
+ puts ("clock_gettime failed");
+ return 1;
+ }
+
+ if (ts2.tv_sec < ts.tv_sec
+ || (ts2.tv_sec == ts.tv_sec && ts2.tv_nsec < ts.tv_nsec))
+ {
+ puts ("timeout too short");
+ return 1;
+ }
+
return 0;
}