Previous: LZTiemerOff procedure To the Table of Content Next: LZTimerResolution function

- 4.75.1.10 -
Standard Units
ZenTimer Unit
ZenTimer Unit Procedures and Functions

LZTiemerOn procedure

Targets: MS-DOS, OS/2, Win32


ZenTimer Unit

Starts the Long Period Zen Timer counting.

Declaration:
procedure LZTimerOn;
Remarks:
Starts the Long Period Zen Timer counting. Once you have started the timer, you can stop it with LZTiemerOff 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 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.

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.

Because the Long Period Zen Timer stores the results in a 32-bit unsigned integer, you can only time periods of up to 232 microseconds, or about 1hr 20mins. For timing longer periods use the Ultra Long Period Zen Timer.


Previous: LZTiemerOff procedure To the Table of Content Next: LZTimerResolution function
LZTiemerOff procedure Table of Content LZTimerResolution function

- 4.75.1.10 -