diff --git a/.travis.yml b/.travis.yml index f609285..c581774 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ language: cpp +os: + - linux + - osx + compiler: - gcc - clang diff --git a/.travis.yml b/.travis.yml index f609285..c581774 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ language: cpp +os: + - linux + - osx + compiler: - gcc - clang diff --git a/utest.h b/utest.h index 54ea260..c58b39a 100644 --- a/utest.h +++ b/utest.h @@ -76,6 +76,8 @@ #endif // ((2 < __GLIBC__) || ((2 == __GLIBC__) && (17 <= __GLIBC_MINOR__))) #endif // defined(__GLIBC__) && defined(__GLIBC_MINOR__) +#elif defined(__APPLE__) +#include #endif #if defined(_MSC_VER) @@ -125,6 +127,8 @@ syscall(SYS_clock_gettime, cid, &ts); #endif return UTEST_CAST(int64_t, ts.tv_sec) * 1000 * 1000 * 1000 + ts.tv_nsec; +#elif __APPLE__ + return UTEST_CAST(int64_t, mach_absolute_time()); #endif }