Index: test-suite/trunk/MultiSource/Benchmarks/nbench/nbench0.c =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/nbench/nbench0.c +++ test-suite/trunk/MultiSource/Benchmarks/nbench/nbench0.c @@ -55,6 +55,10 @@ #include "nbench0.h" #include "hardware.h" +#ifndef N_ITERATIONS +#define N_ITERATIONS 1 +#endif + /************* **** main **** *************/ @@ -65,6 +69,7 @@ #endif { int i; /* Index */ +int iter; time_t time_and_date; /* Self-explanatory */ struct tm *loctime; double bmean; /* Benchmark mean */ @@ -243,16 +248,19 @@ if(tests_to_do[i]) { sprintf(buffer,"%s :",ftestnames[i]); output_string(buffer); +#if 0 if (0!=bench_with_confidence(i, &bmean, &bstdev, &bnumrun)){ -#if 0 output_string("\n** WARNING: The current test result is NOT 95 % statistically certain.\n"); output_string("** WARNING: The variation among the individual results is too large.\n"); output_string(" :"); -#endif } +#endif + for (iter = 0; iter < N_ITERATIONS; ++iter) { + (*funcpointer[i])(); + } #ifdef LINUX sprintf(buffer," %15.5g : %9.2f : %9.2f\n", bmean,bmean/bindex[i],bmean/lx_bindex[i]); Index: test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.h =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.h +++ test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.h @@ -28,7 +28,6 @@ */ #include #include -#include #include #include "nmglobal.h" Index: test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.c =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.c +++ test-suite/trunk/MultiSource/Benchmarks/nbench/sysspec.c @@ -781,25 +781,8 @@ */ unsigned long StartStopwatch() { -#ifdef MACTIMEMGR -/* -** For Mac code warrior, use timer. In this case, what we return is really -** a dummy value. -*/ -InsTime((QElemPtr)&myTMTask); -PrimeTime((QElemPtr)&myTMTask,-MacHSTdelay); -return((unsigned long)1); -#else -#ifdef WIN31TIMER -/* -** Win 3.x timer returns a DWORD, which we coax into a long. -*/ -_Call16(lpfn,"p",&win31tinfo); -return((unsigned long)win31tinfo.dwmsSinceStart); -#else -return((unsigned long)clock()); -#endif -#endif + /* no timing code in this version. */ + return 0; } /**************************** @@ -809,21 +792,8 @@ */ unsigned long StopStopwatch(unsigned long startticks) { - -#ifdef MACTIMEMGR -/* -** For Mac code warrior...ignore startticks. Return val. in microseconds -*/ -RmvTime((QElemPtr)&myTMTask); -return((unsigned long)(MacHSTdelay+myTMTask.tmCount-MacHSTohead)); -#else -#ifdef WIN31TIMER -_Call16(lpfn,"p",&win31tinfo); -return((unsigned long)win31tinfo.dwmsSinceStart-startticks); -#else -return((unsigned long)clock()-startticks); -#endif -#endif + /* no timing code in this version. */ + return 1000; } /**************************** @@ -833,25 +803,8 @@ */ unsigned long TicksToSecs(unsigned long tickamount) { -#ifdef CLOCKWCT -return((unsigned long)(tickamount/CLK_TCK)); -#endif - -#ifdef MACTIMEMGR -/* +++ MAC time manager version (using timer in microseconds) +++ */ -return((unsigned long)(tickamount/1000000)); -#endif - -#ifdef CLOCKWCPS -/* Everybody else */ -return((unsigned long)(tickamount/CLOCKS_PER_SEC)); -#endif - -#ifdef WIN31TIMER -/* Each tick is 840 nanoseconds */ -return((unsigned long)(tickamount/1000L)); -#endif - + /* no timing code in this version. */ + return 0; } /**************************** @@ -862,23 +815,7 @@ */ double TicksToFracSecs(unsigned long tickamount) { -#ifdef CLOCKWCT -return((double)tickamount/(double)CLK_TCK); -#endif - -#ifdef MACTIMEMGR -/* +++ MAC time manager version +++ */ -return((double)tickamount/(double)1000000); -#endif - -#ifdef CLOCKWCPS -/* Everybody else */ -return((double)tickamount/(double)CLOCKS_PER_SEC); -#endif - -#ifdef WIN31TIMER -/* Using 840 nanosecond ticks */ -return((double)tickamount/(double)1000); -#endif + /* no timing code in this version. */ + return 0; }