From: Szabolcs Nagy Date: Thu, 26 Dec 2013 17:14:30 +0000 (+0000) Subject: simple clock_gettime test X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=2a67607b30e4a76fc176decc7a1bc03a3bbfea73;p=libc-test simple clock_gettime test --- 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; +}