Esempio n. 1
0
/****************************************************************************
REMARKS:
This function initialises the high precision timing functions for the
SciTech SNAP Graphics loader library.
****************************************************************************/
ibool NAPI GA_TimerInit(void)
{
    if (_GA_haveCPUID() && (_GA_getCPUIDFeatures() & CPU_HaveRDTSC) != 0) {
        haveRDTSC = true;
        }
    return true;
}
Esempio n. 2
0
/****************************************************************************
REMARKS:
This function initialises the high precision timing functions for the
Nucleus loader library.
****************************************************************************/
ibool NAPI GA_TimerInit(void)
{
	if (_GA_haveCPUID() && (_GA_getCPUIDFeatures() & CPU_HaveRDTSC) != 0) {
		haveRDTSC = true;
		return true;
		}
	else if (QueryPerformanceFrequency((LARGE_INTEGER*)&countFreq)) {
		haveRDTSC = false;
		return true;
		}
	return false;
}