diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-01-31 15:59:19 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-01-31 15:59:19 +0000 |
commit | 268531a72e1967ea26451d54b9e66b358ad1d64a (patch) | |
tree | b747e736796dcc0d4faa8880bb7fc34b809bbbb4 /testsuites/libtests | |
parent | 2011-01-31 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-268531a72e1967ea26451d54b9e66b358ad1d64a.tar.bz2 |
2011-01-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* POSIX/clock_gettime.c, POSIX/gettimeofday.c: New.
* Makefile.am: Add clock_gettime, gettimeofday.c.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/libtests/POSIX/clock_gettime.c | 17 | ||||
-rw-r--r-- | testsuites/libtests/POSIX/gettimeofday.c | 18 |
3 files changed, 40 insertions, 0 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index 8b03c21c19..33cb1999d4 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,8 @@ +2011-01-31 Ralf Corsépius <ralf.corsepius@rtems.org> + + * POSIX/clock_gettime.c, POSIX/gettimeofday.c: New. + * Makefile.am: Add clock_gettime, gettimeofday.c. + 2011-01-28 Bharath Suri <bharath.s.jois@gmail.com> PR 1661/testing diff --git a/testsuites/libtests/POSIX/clock_gettime.c b/testsuites/libtests/POSIX/clock_gettime.c new file mode 100644 index 0000000000..6172a41b68 --- /dev/null +++ b/testsuites/libtests/POSIX/clock_gettime.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2011 by + * Ralf Corsépius, Ulm, Germany. All rights reserved. + * + * Permission to use, copy, modify, and distribute this software + * is freely granted, provided that this notice is preserved. + */ + +#include <time.h> + +int +main (void) +{ + struct timespec mytime; + + return clock_gettime(CLOCK_REALTIME,&mytime); +} diff --git a/testsuites/libtests/POSIX/gettimeofday.c b/testsuites/libtests/POSIX/gettimeofday.c new file mode 100644 index 0000000000..a5ccd3d1d3 --- /dev/null +++ b/testsuites/libtests/POSIX/gettimeofday.c @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2011 by + * Ralf Corsépius, Ulm, Germany. All rights reserved. + * + * Permission to use, copy, modify, and distribute this software + * is freely granted, provided that this notice is preserved. + */ + +#include <sys/time.h> + +int +main (void) +{ + struct timeval tv; + struct timezone tz; + + return gettimeofday(&tv, &tz); +} |