1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-27 18:24:27 +01:00

Merge pull request #561 from druckdev/master

Support `UNITY_INCLUDE_EXEC_TIME` under Apples OSX
This commit is contained in:
Mark VanderVoord
2021-05-31 11:04:01 -04:00
committed by GitHub

View File

@@ -333,7 +333,7 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
UnityPrintNumberUnsigned(execTimeMs); \ UnityPrintNumberUnsigned(execTimeMs); \
UnityPrint(" ms)"); \ UnityPrint(" ms)"); \
} }
#elif defined(__unix__) #elif defined(__unix__) || defined(__APPLE__)
#include <time.h> #include <time.h>
#define UNITY_TIME_TYPE struct timespec #define UNITY_TIME_TYPE struct timespec
#define UNITY_GET_TIME(t) clock_gettime(CLOCK_MONOTONIC, &t) #define UNITY_GET_TIME(t) clock_gettime(CLOCK_MONOTONIC, &t)