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; +}