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 @@ -405,13 +405,13 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
405405 #define UNITY_GET_TIME (t ) clock_gettime(CLOCK_MONOTONIC, &t)
406406 #define UNITY_EXEC_TIME_START () UNITY_GET_TIME(Unity.CurrentTestStartTime)
407407 #define UNITY_EXEC_TIME_STOP () UNITY_GET_TIME(Unity.CurrentTestStopTime)
408- #define UNITY_PRINT_EXEC_TIME () { \
409- UNITY_UINT execTimeMs = ((Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
410- execTimeMs += ((Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
408+ #define UNITY_PRINT_EXEC_TIME () do { \
409+ UNITY_UINT execTimeMs = (UNITY_UINT)( (Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
410+ execTimeMs += (UNITY_UINT)( (Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
411411 UnityPrint (" (" ); \
412412 UnityPrintNumberUnsigned (execTimeMs); \
413413 UnityPrint (" ms)" ); \
414- }
414+ } while ( 0 )
415415 #endif
416416 #endif
417417#endif
You can’t perform that action at this time.
0 commit comments