Ejemplo n.º 1
0
/****************************************************************************
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);
}
Ejemplo n.º 2
0
/****************************************************************************
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);
}
Ejemplo n.º 3
0
/****************************************************************************
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;
}
Ejemplo n.º 4
0
/****************************************************************************
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;
	}
}