From e470da85f7b9426eea03d66086c2822bf29e9b05 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 3 Mar 2011 23:37:20 +0000 Subject: Some cleanups, mostly x86_64 compat plus interlocked macros --- tests/benchtest3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/benchtest3.c') diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 023460d..6ff3c90 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -59,18 +59,18 @@ struct _timeb currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; -#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \ - - (_TStart.time*1000+_TStart.millitm)) +#define GetDurationMilliSecs(_TStart, _TStop) ((long)((_TStop.time*1000+_TStop.millitm) \ + - (_TStart.time*1000+_TStart.millitm))) /* * Dummy use of j, otherwise the loop may be removed by the optimiser * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; _ftime(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; _ftime(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void * -- cgit v1.2.3