#if defined(unix) || defined(__APPLE__)
# include <sys/time.h>
# include <sys/resource.h>
-#elif defined(WIN32)
+#elif defined(_WIN32)
# include <windows.h>
#endif
#define clitkDD_h
#include <iostream>
-#ifdef WIN32
+#ifdef _WIN32
# include <windows.h>
#endif
// David's debug
-#ifdef WIN32
+#ifdef _WIN32
# define DD(a) { \
std::ostringstream ossDD; \
ossDD << #a " = [ " << a << " ]" << std::endl; \
===========================================================================**/
#ifndef CLITKPORTABILITY_H
#define CLITKPORTABILITY_H
-#if defined(WIN32)
+#if defined(_WIN32)
# define _USE_MATH_DEFINES //Before math.h include (i.e. cmath)
#endif
#include <cmath>
-#if defined(WIN32)
+#if defined(_WIN32)
# define rint(x) floor(x+0.5)
# define lrint(x) (long)rint(x)
#endif
clitk::Timer::Timer()
{
Reset();
-#if defined(WIN32)
+#if defined(_WIN32)
QueryPerformanceFrequency((LARGE_INTEGER*)&mFrequency);
#endif
}
{
#if defined(unix) || defined(__APPLE__)
getrusage(RUSAGE_SELF, &mBegin);
-#elif defined(WIN32)
+#elif defined(_WIN32)
QueryPerformanceCounter((LARGE_INTEGER*)&mBegin);
#endif
mNumberOfCall++;
mElapsed += (mEnd.ru_utime.tv_usec - mBegin.ru_utime.tv_usec)+
(mEnd.ru_utime.tv_sec - mBegin.ru_utime.tv_sec)*1000000;
}
-#elif defined(WIN32)
+#elif defined(_WIN32)
QueryPerformanceCounter((LARGE_INTEGER*)&mEnd);
if (accumulate) {
mElapsed += ((mEnd-mBegin)*1000000)/(long double)mFrequency;
#if defined(unix) || defined(__APPLE__)
# include <sys/time.h>
# include <sys/resource.h>
-#elif defined(WIN32)
+#elif defined(_WIN32)
# include <windows.h>
#endif
#include <iostream>
#if defined(unix) || defined(__APPLE__)
rusage mBegin;
rusage mEnd;
-#elif defined(WIN32)
+#elif defined(_WIN32)
unsigned __int64 mBegin;
unsigned __int64 mEnd;
unsigned __int64 mFrequency;