#include #ifdef HRTIME #include #endif #ifdef _WIN32 #include #include #include #include #include #else #include #include #include #include #include #endif #include "Timers.h" /*real time or user time*/ #define REAL_TIME // global file streams /*ofstream debugs("debug.log");*/ static int hasHRTimer = 0; #ifdef _MSC_VER static LARGE_INTEGER hrFreq; #endif #ifdef HRTIME struct hrtime_struct *hrTimer = NULL; #endif void initTiming() { #ifdef _MSC_VER hasHRTimer = QueryPerformanceFrequency(&hrFreq); #else #ifdef HRTIME if (hrtime_is_present()) { hrtime_init(); hasHRTimer = (0 == get_hrtime_struct(0, &hrTimer)); debugs<<"Using UNIX hires timer"<