Previous: 4.80.1.9. LZTiemerOff procedure To the Table of Contents Next: 4.80.1.11. LZTimerResolution function
4.80.1.9. LZTiemerOff procedure Table of Contents 4.80.1.11. LZTimerResolution function

- 4.80.1.10. -
Table of Contents
4. Standard Units
4.80. ZenTimer - Full-featured ZTimer Library
4.80.1. ZenTimer Unit Procedures and Functions
4.80.1.10. LZTiemerOn procedure


4.80.1.10. 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 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 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: 4.80.1.9. LZTiemerOff procedure To the Table of Contents Next: 4.80.1.11. LZTimerResolution function
4.80.1.9. LZTiemerOff procedure Table of Contents 4.80.1.11. LZTimerResolution function

- 4.80.1.10. -