Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ UTEST_C_FUNC __declspec(dllimport) int __stdcall QueryPerformanceFrequency(
#define UTEST_USE_CLOCKGETTIME
#endif

#elif defined(_AIX)
#include <time.h>

#elif defined(__APPLE__)
#include <time.h>
#endif
Expand Down Expand Up @@ -368,6 +371,10 @@ static UTEST_INLINE utest_int64_t utest_ns(void) {
#endif
#endif
return UTEST_CAST(utest_int64_t, ts.tv_sec) * 1000 * 1000 * 1000 + ts.tv_nsec;
#elif defined(_AIX)
struct timespec ts = {0, 0};
clock_gettime(CLOCK_REALTIME, &ts);
return UTEST_CAST(utest_int64_t, ts.tv_sec) * 1000 * 1000 * 1000 + ts.tv_nsec;
#elif __EMSCRIPTEN__
return emscripten_performance_now() * 1000000.0;
#else
Expand Down