/**************************************************************************** REMARKS: Call the assembler Zen Timer functions to do the timing. ****************************************************************************/ static ulong __LZTimerCount( LZTimerObject *tm) { CPU_largeInteger tmCount; _CPU_diffTime64(&tm->start,&tm->end,&tmCount); return _CPU_calcMicroSec(&tmCount,frequency); }
/**************************************************************************** REMARKS: Compute the lap time since the timer was started. ****************************************************************************/ static ulong __LZTimerLap( LZTimerObject *tm) { CPU_largeInteger tmLap,tmCount; DosTmrQueryTime((QWORD*)&tmLap); _CPU_diffTime64(&tm->start,&tmLap,&tmCount); return _CPU_calcMicroSec(&tmCount,frequency); }
/**************************************************************************** REMARKS: Compute the elapsed time in microseconds between start and end timings. ****************************************************************************/ static ulong __LZTimerCount( LZTimerObject *tm) { CPU_largeInteger tmCount; if (havePerformanceCounter) { _CPU_diffTime64(&tm->start,&tm->end,&tmCount); return _CPU_calcMicroSec(&tmCount,countFreq.low); } else return (tm->end.low - tm->start.low) * 1000L; }
/**************************************************************************** REMARKS: Compute the lap time since the timer was started. ****************************************************************************/ static ulong __LZTimerLap( LZTimerObject *tm) { CPU_largeInteger tmLap,tmCount; if (havePerformanceCounter) { QueryPerformanceCounter((LARGE_INTEGER*)&tmLap); _CPU_diffTime64(&tm->start,&tmLap,&tmCount); return _CPU_calcMicroSec(&tmCount,countFreq.low); } else { tmLap.low = timeGetTime(); return (tmLap.low - tm->start.low) * 1000L; } }