File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -398,13 +398,13 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
398398 #define UNITY_GET_TIME (t ) clock_gettime(CLOCK_MONOTONIC, &t)
399399 #define UNITY_EXEC_TIME_START () UNITY_GET_TIME(Unity.CurrentTestStartTime)
400400 #define UNITY_EXEC_TIME_STOP () UNITY_GET_TIME(Unity.CurrentTestStopTime)
401- #define UNITY_PRINT_EXEC_TIME () { \
402- UNITY_UINT execTimeMs = ((Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
403- execTimeMs += ((Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
401+ #define UNITY_PRINT_EXEC_TIME () do { \
402+ UNITY_UINT execTimeMs = (UNITY_UINT)( (Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
403+ execTimeMs += (UNITY_UINT)( (Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
404404 UnityPrint (" (" ); \
405405 UnityPrintNumberUnsigned (execTimeMs); \
406406 UnityPrint (" ms)" ); \
407- }
407+ } while ( 0 )
408408 #endif
409409 #endif
410410#endif
You can’t perform that action at this time.
0 commit comments