Example #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;
}
Example #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;
}