diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-11-28 22:00:53 -0800 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-11-28 22:40:05 -0800 |
commit | 8359f22a288236613e64f2b3e96ef6e2ac2de097 (patch) | |
tree | 04967bfdadf913d1f8a70ddf5769446d963546dd /test/pthread/ex7.c | |
parent | 5418ef694ee17c698270702d927f04836706e60b (diff) | |
parent | 8739ed0a9b6597e7106f878ec159a19fe0848f23 (diff) |
Merge remote branch 'origin/master' into nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'test/pthread/ex7.c')
-rw-r--r-- | test/pthread/ex7.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c index 49af18d96..8eeb9a2e5 100644 --- a/test/pthread/ex7.c +++ b/test/pthread/ex7.c @@ -8,7 +8,7 @@ #include <string.h> #include <pthread.h> #include <sys/time.h> -#include <unistd.h> +#include <time.h> /* Our event variable using a condition variable contruct. */ typedef struct { @@ -63,6 +63,9 @@ int main (void) { unsigned long count; + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = 10 * 1000; setvbuf (stdout, NULL, _IONBF, 0); @@ -96,7 +99,7 @@ main (void) printf ("count = %lu\n", count); } - usleep (10); + nanosleep (&ts, NULL); } return 0; |