File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,13 +426,13 @@ typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
426426 #define UNITY_GET_TIME (t ) clock_gettime(CLOCK_MONOTONIC , &t)
427427 #define UNITY_EXEC_TIME_START () UNITY_GET_TIME (Unity.CurrentTestStartTime)
428428 #define UNITY_EXEC_TIME_STOP () UNITY_GET_TIME (Unity.CurrentTestStopTime)
429- #define UNITY_PRINT_EXEC_TIME () { \
430- UNITY_UINT execTimeMs = ((Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
431- execTimeMs += ((Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
429+ #define UNITY_PRINT_EXEC_TIME () do { \
430+ UNITY_UINT execTimeMs = (UNITY_UINT )( (Unity.CurrentTestStopTime .tv_sec - Unity.CurrentTestStartTime .tv_sec ) * 1000L ); \
431+ execTimeMs += (UNITY_UINT )( (Unity.CurrentTestStopTime .tv_nsec - Unity.CurrentTestStartTime .tv_nsec ) / 1000000L ); \
432432 UnityPrint (" (" ); \
433433 UnityPrintNumberUnsigned (execTimeMs); \
434434 UnityPrint (" ms)" ); \
435- }
435+ } while ( 0 )
436436 #endif
437437 #endif
438438#endif
You can’t perform that action at this time.
0 commit comments