|
|
|
|
LZTimerOnExt
Starts the Long Period Zen Timer counting.
Declaration
void ZAPI LZTimerOnExt(
LZTimerObject *tm)
Prototype In
ztimer.h
Parameters
tm |
Timer object to start timing with |
Description
Starts the Long Period Zen Timer counting. Once you have started the timer, you can stop it with LZTimerOff or you can latch the current count with LZTimerLap.
The Long Period Zen Timer uses a number of different high precision timing mechanisms to obtain microsecond accurate timings results whenever possible. The following different techniques are used depending on the operating system, runtime environment and CPU on the target machine. If the target system has a Pentium CPU installed which supports the Read Time Stamp Counter instruction (RDTSC), the Zen Timer library will use this to obtain the maximum timing precision available.
Under 32-bit Windows, if the Pentium RDTSC instruction is not available, we first try to use the Win32 QueryPerformanceCounter API, and if that is not available we fall back on the timeGetTime API which is always supported.
Under 32-bit DOS, if the Pentium RDTSC instruction is not available, we then do all timing using the old style 8253 timer chip. The 8253 timer routines provide highly accurate timings results in pure DOS mode, however in a DOS box under Windows or other Operating Systems the virtualization of the timer can produce inaccurate results.
Note: Because the Long Period Zen Timer stores the results in a 32-bit unsigned integer, you can only time periods of up to 2^32 microseconds, or about 1hr 20mins. For timing longer periods use the Ultra Long Period Zen Timer.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com