summaryrefslogtreecommitdiff
path: root/tests/benchtest2.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-03 23:37:20 +0000
committerrpj <rpj>2011-03-03 23:37:20 +0000
commite470da85f7b9426eea03d66086c2822bf29e9b05 (patch)
treeb3747768258dc62752612327904be1f1067d5c7f /tests/benchtest2.c
parent1170175259781ece4a8d99d517230f4b9ecb7b50 (diff)
Some cleanups, mostly x86_64 compat plus interlocked macros
Diffstat (limited to 'tests/benchtest2.c')
-rw-r--r--tests/benchtest2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchtest2.c b/tests/benchtest2.c
index d92bb3c..10deca2 100644
--- a/tests/benchtest2.c
+++ b/tests/benchtest2.c
@@ -65,18 +65,18 @@ struct _timeb currSysTimeStop;
pthread_t worker;
int running = 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 *