summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/POSIX
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-01-31 15:59:19 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-01-31 15:59:19 +0000
commit268531a72e1967ea26451d54b9e66b358ad1d64a (patch)
treeb747e736796dcc0d4faa8880bb7fc34b809bbbb4 /testsuites/libtests/POSIX
parent2011-01-31 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-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/POSIX')
-rw-r--r--testsuites/libtests/POSIX/clock_gettime.c17
-rw-r--r--testsuites/libtests/POSIX/gettimeofday.c18
2 files changed, 35 insertions, 0 deletions
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);
+}