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;
398
398
#define UNITY_GET_TIME (t ) clock_gettime(CLOCK_MONOTONIC, &t)
399
399
#define UNITY_EXEC_TIME_START () UNITY_GET_TIME(Unity.CurrentTestStartTime)
400
400
#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 ); \
404
404
UnityPrint (" (" ); \
405
405
UnityPrintNumberUnsigned (execTimeMs); \
406
406
UnityPrint (" ms)" ); \
407
- }
407
+ } while ( 0 )
408
408
#endif
409
409
#endif
410
410
#endif
You can’t perform that action at this time.
0 commit comments