35 #if defined(HAVE_MAC_TIMER) && !defined(HAVE_MAC_PCI_TIMER) 43 #pragma only_std_keywords off 47 #pragma only_std_keywords reset 52 UnsignedWide microsec;
58 Microseconds(µsec);
77 diff.hi = diff.lo = 0;
80 diff.hi = t1.hi - t2.hi;
86 diff.hi = diff.lo = 0;
90 diff.lo = t1.lo - t2.lo;
97 #ifdef HAVE_WIN32_TIMER 100 static LARGE_INTEGER gFreq;
101 static int gHaveHiResTimer = 0;
102 static int gFirstTime = 1;
104 unsigned long GetPerfTime(
void)
106 LARGE_INTEGER lCounter;
111 if (QueryPerformanceFrequency(&gFreq)) {
115 if (gHaveHiResTimer) {
116 QueryPerformanceCounter(&lCounter);
117 return lCounter.u.LowPart;
119 return (
unsigned long) clock();
123 double GetPerfSec(
double pTime)
125 if (gHaveHiResTimer) {
126 return pTime / gFreq.u.LowPart;
129 return pTime / CLOCKS_PER_SEC;
135 #if defined(FFTW_USE_GETTIMEOFDAY) 139 #if defined(HAVE_BSDGETTIMEOFDAY) && ! defined(HAVE_GETTIMEOFDAY) 140 #define gettimeofday BSDgettimeofday 146 gettimeofday(&tv, 0);
154 diff.tv_sec = t1.tv_sec - t2.tv_sec;
155 diff.tv_usec = t1.tv_usec - t2.tv_usec;
157 while (diff.tv_usec < 0) {
158 diff.tv_usec += 1000000L;
Utilities for timing functions.
fftw_time fftw_gettimeofday_get_time(void)
#define fftw_time_diff(t1, t2)
fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2)