ibool accurate)
{
if (cpuSpeed == -1) {
- __ZTimerInit();
+ __ZTimerInit();
#ifdef __INTEL__
- cpuSpeed = CPU_getProcessorSpeedInHZ(accurate);
- haveRDTSC = CPU_haveRDTSC() && (cpuSpeed > 0);
+ cpuSpeed = CPU_getProcessorSpeedInHZ(accurate);
+ haveRDTSC = CPU_haveRDTSC() && (cpuSpeed > 0);
#endif
- }
+ }
}
/****************************************************************************
{
#ifdef __INTEL__
if (haveRDTSC) {
- _CPU_readTimeStamp(&tm->start);
- }
+ _CPU_readTimeStamp(&tm->start);
+ }
else
#endif
- __LZTimerOn(tm);
+ __LZTimerOn(tm);
}
/****************************************************************************
CPU_largeInteger tmLap,tmCount;
if (haveRDTSC) {
- _CPU_readTimeStamp(&tmLap);
- _CPU_diffTime64(&tm->start,&tmLap,&tmCount);
- return _CPU_calcMicroSec(&tmCount,cpuSpeed);
- }
+ _CPU_readTimeStamp(&tmLap);
+ _CPU_diffTime64(&tm->start,&tmLap,&tmCount);
+ return _CPU_calcMicroSec(&tmCount,cpuSpeed);
+ }
else
#endif
- return __LZTimerLap(tm);
+ return __LZTimerLap(tm);
}
/****************************************************************************
{
#ifdef __INTEL__
if (haveRDTSC) {
- _CPU_readTimeStamp(&tm->end);
- }
+ _CPU_readTimeStamp(&tm->end);
+ }
else
#endif
- __LZTimerOff(tm);
+ __LZTimerOff(tm);
}
/****************************************************************************
CPU_largeInteger tmCount;
if (haveRDTSC) {
- _CPU_diffTime64(&tm->start,&tm->end,&tmCount);
- return _CPU_calcMicroSec(&tmCount,cpuSpeed);
- }
+ _CPU_diffTime64(&tm->start,&tm->end,&tmCount);
+ return _CPU_calcMicroSec(&tmCount,cpuSpeed);
+ }
else
#endif
- return __LZTimerCount(tm);
+ return __LZTimerCount(tm);
}
/****************************************************************************
void ZAPI ULZTimerResolution(
ulong *resolution)
{ *resolution = ULZTIMER_RESOLUTION; }
-