[Android] Get profile class to use clock_gettime on non win32 systems
This commit is contained in:
parent
bf0674f62f
commit
71d38d890b
|
@ -41,6 +41,10 @@ SPECIAL_TIMERS CProfiling::StartTimer(SPECIAL_TIMERS Address)
|
||||||
}
|
}
|
||||||
m_StartTimeHi = HiValue;
|
m_StartTimeHi = HiValue;
|
||||||
m_StartTimeLo = LoValue;
|
m_StartTimeLo = LoValue;
|
||||||
|
#elif !defined(_WIN32)
|
||||||
|
struct timespec now;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
m_StartTimeLo = (now.tv_sec * 1000) + (now.tv_nsec / 1000000);
|
||||||
#else
|
#else
|
||||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,6 +65,10 @@ SPECIAL_TIMERS CProfiling::StopTimer()
|
||||||
mov LoValue, eax;
|
mov LoValue, eax;
|
||||||
popad;
|
popad;
|
||||||
}
|
}
|
||||||
|
#elif !defined(_WIN32)
|
||||||
|
struct timespec now;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
LoValue = (now.tv_sec * 1000) + (now.tv_nsec / 1000000);
|
||||||
#else
|
#else
|
||||||
g_Notify->BreakPoint(__FILE__, __LINE__);
|
g_Notify->BreakPoint(__FILE__, __LINE__);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue