From 2a67607b30e4a76fc176decc7a1bc03a3bbfea73 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 26 Dec 2013 17:14:30 +0000 Subject: [PATCH] simple clock_gettime test --- src/functional/clock_gettime.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/functional/clock_gettime.c diff --git a/src/functional/clock_gettime.c b/src/functional/clock_gettime.c new file mode 100644 index 0000000..7951b11 --- /dev/null +++ b/src/functional/clock_gettime.c @@ -0,0 +1,14 @@ +#include +#include +#include +#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; +} -- 2.20.1