From b59b0af0b26bcca27af0216309c15da663bcd9b7 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 13 Nov 2008 22:44:26 +0000 Subject: -- Begin stripping useless timing function wrappers and defines git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@19 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- sysspec.c | 66 --------------------------------------------------------------- 1 file changed, 66 deletions(-) (limited to 'sysspec.c') diff --git a/sysspec.c b/sysspec.c index f4b5bf1..121eac4 100644 --- a/sysspec.c +++ b/sysspec.c @@ -418,25 +418,7 @@ return; */ 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 } /**************************** @@ -447,20 +429,7 @@ return((unsigned long)clock()); 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 } /**************************** @@ -470,25 +439,7 @@ return((unsigned long)clock()-startticks); */ 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 - } /**************************** @@ -499,23 +450,6 @@ return((unsigned long)(tickamount/1000L)); */ 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 } -- cgit v1.2.3