CT_SETTIC

 SETTIC()
 Increases number of time ticks to produce a more precise time measurement
------------------------------------------------------------------------------
 Syntax

     SETTIC([<lAcceleration>]) --> lAccelerated

 Arguments

     <lAcceleration>  When this parameter is .T., the number of timer
     ticks is increased by a factor of 128.  The default is normal timer
     ticks (.F.).

     ()  With no arguments, SETTIC() returns the current status of the timer
     as a .T. when accelerated; .F. if it is not.

 Returns

     The SETTIC() function returns .T. when the timer is accelerated;
     otherwise, it returns .F..

 Description

     If the integrated timer in your computer uses SETTIC(.T.) to accelerate,
     then the number of ticks per second increases from 18.2 to around 2500.
     This makes time measurement more precise and allows you to compare the
     speed of different routines more accurately.

     The computer's clock time, which is also based on the timer tick,
     continues to operate correctly.

 Notes

     Warning!  You must uninstall SETTIC() before you leave a program;
     otherwise, you will hang the system.  However, if the Extended Drivers
     CTUS.LIB is linked in, then SETTIC() uninstalls automatically when you
     exit the program.

     .  As long as the timer is accelerated, you cannot implement the
        KEYSEC(), SHOWTIME(), and SHOWKEY() functions because they use the
        timer tick.  Therefore, you must uninstall these functions before you
        implement SETTIC(.T.).

     .  Do not place (link) SETTIC() within an overlay, since an
        interrupt service routine can never be within an overlay.  Of course,
        you can call SETTIC() from an overlay.

     .  Since each timer tick must call an interrupt service, your
        program's execution speed decreases.

 Example

     Measure an individual UDF in ticks.  The tick rate increases first, and
     then decreases after UDF is executed and the number of resulting ticks
     is queried:

     SETTIC(.T.)
        MY_UDF(I)            // Needs to be measured...
     SETTIC()
     ? "Required ticks:", GETTIC()

See Also: GETTIC()

 

Tools – Miscellaneous Functions

Introduction Miscellaneous Functions
ALLOFREE()*  Determines the maximum memory size allocation
BLANK()      Creates a blank value for each data type
COMPLEMENT() Forms the complement value of a data type
DATATYPE()*  Determines the data type of a variable or UDF
GETTIC()     Determines the number of timer ticks
KBDDISABLE() Locks/unlocks the keyboard
KBDEMULATE() Inserts characters into BIOS keyboard buffer to emulate input
KBDSPEED()   Sets keyboard auto repeat speed
KBDSTAT()    Tests for key shift state status, such as Ctrl and Shift
KBDTYPE()    Determines the type of keyboard in use
KEYSEC()     Triggers a key trap after a time delay
KEYTIME()    Triggers a key trap at a specific clock time
MILLISEC()   Time delay in milliseconds
NUL()        Converts the value returned by a function into a null string
SCANKEY()    Queries scan code of keyboard input
SETTIC()     Increases number of time ticks
SHOWKEY()    Continuously displays the INSERT and LOCK status
SOUND()      Creates tones (melodies) by designating frequency and duration
SPEED()      A comparison value used to determine the processor speed
STACKFREE()  Determines the remaining stack space
TOOLVER()    Queries the version number of the Clipper Tools in use
XTOC()       Converts an expression of any data type into a string