- Code: Select all
#ifdef __linux__
dAssert (0);
in the function:
- Code: Select all
void dNewton::ResetTimer()
{
m_frequency = 0;
m_baseCount = 0;
#ifdef _MSC_VER
LARGE_INTEGER baseCount;
LARGE_INTEGER frequency;
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter (&baseCount);
m_baseCount = dLong (baseCount.QuadPart);
m_frequency = dLong (frequency.QuadPart);
#endif
//#if (defined (_POSIX_VER) || defined (_POSIX_VER_64))
#ifdef __linux__
dAssert (0);
//timespec ts;
//clock_gettime(CLOCK_REALTIME, &ts); // Works on Linux
//baseCount = ts.tv_nsec / 1000;
//m_baseCount = dLong (ts.tv_sec) * 1000000 + ts.tv_nsec / 1000;
m_baseCount = 0;
#endif
#ifdef _MACOSX_VER
timeval tp;
gettimeofday(&tp, NULL);
dLong microsecunds = ((dLong)tp.tv_sec) * 1000000 + tp.tv_usec;
m_baseCount = microsecunds;
#endif
m_microseconds = GetTimeInMicrosenconds();
}
Should all of these be uncommented and the asserts removed?

