]>
git.saurik.com Git - apple/libc.git/blob - tests/timespec_get.c
6 #include <darwintest.h>
8 T_DECL(timespec_get
, "timespec_get")
11 T_ASSERT_EQ(timespec_get(&ts
, TIME_UTC
), TIME_UTC
, NULL
);
14 T_ASSERT_POSIX_ZERO(gettimeofday(&tv
, NULL
), NULL
);
16 T_EXPECT_LE((unsigned long)tv
.tv_sec
- (unsigned long)ts
.tv_sec
, (unsigned long)1,
17 "gettimeofday() should return same as timespec_get(TIME_UTC)");