Purpose |
Measures elapsed CPU cycles. |
Syntax |
TIX QuadVar |
Remarks |
The TIX statement offers you the ability to measure elapsed CPU cycles, the smallest timing increment possible. Modern processors typically execute billions of cycles per second. This can be beneficial for comparing the execution speed of various styles of coding in PowerBASIC. TIX QuadVar The first form of the TIX statement retrieves the current value of the cycle counter and assigns it to the Quad Integer variable. TIX END QuadVar The second form of the TIX statement retrieves the current value of the cycle counter. The value in the QuadVar is subtracted from it, and the result is assigned to QuadVar. To measure the total cycle count for a particular set of statements, you would write: TIX CycleCount&& At this point, CycleCount&& contains the elapsed number of CPU cycles. |
See also |