37 #ifndef NVWA_PCTIMER_H 38 #define NVWA_PCTIMER_H 45 #define NVWA_PCTIMER_NO_WIN32 48 #ifndef WIN32_LEAN_AND_MEAN 49 #define WIN32_LEAN_AND_MEAN 53 #ifdef NVWA_PCTIMER_NO_WIN32 54 #undef NVWA_PCTIMER_NO_WIN32 60 typedef double pctimer_t;
62 __inline pctimer_t pctimer(
void)
64 static LARGE_INTEGER pcount, pcfreq;
69 QueryPerformanceFrequency(&pcfreq);
73 QueryPerformanceCounter(&pcount);
74 return (
double)pcount.QuadPart / (double)pcfreq.QuadPart;
85 typedef double pctimer_t;
87 __inline pctimer_t pctimer(
void)
90 gettimeofday(&tv, NULL);
91 return (
double)tv.tv_sec + (double)tv.tv_usec / 1000000;
Common definitions for preprocessing.