projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
38d7f0f
)
simple clock_gettime test
author
Szabolcs Nagy
<nsz@port70.net>
Thu, 26 Dec 2013 17:14:30 +0000
(17:14 +0000)
committer
Szabolcs Nagy
<nsz@port70.net>
Thu, 26 Dec 2013 17:14:30 +0000
(17:14 +0000)
src/functional/clock_gettime.c
[new file with mode: 0644]
patch
|
blob
diff --git a/src/functional/clock_gettime.c
b/src/functional/clock_gettime.c
new file mode 100644
(file)
index 0000000..
7951b11
--- /dev/null
+++ b/
src/functional/clock_gettime.c
@@ -0,0
+1,14
@@
+#include <time.h>
+#include <errno.h>
+#include <string.h>
+#include "test.h"
+
+#define TEST(c, ...) \
+ ( (c) || (t_error(#c " failed: " __VA_ARGS__),0) )
+
+int main()
+{
+ struct timespec ts;
+ TEST(clock_gettime(CLOCK_REALTIME, &ts) == 0 && errno == 0, "%s\n", strerror(errno));
+ return t_status;
+}