Tick – Remote Processing CAMBASIC User Manual

Page 165

Advertising
background image

Comm ands - 132

TICK

Process Function

SYNTAX:

a= TICK( n)

PURPOSE:

To retur n the time from the TICK tim ers.

REMARK S:

n is from 0 to 2, corresponding to a tick timer.

Ther e are thr ee TIC K timer s in CAM BASIC that accum ulate on a 12 ho ur basis. These ar e separa te
from the calendar/ clock and are not battery-backed.

The functions re turn the time in 0. 005 (0.0 10 in 9 MH z systems) second incr ements up to 12 hour s.
Using the proc ess clock has an advantage ove r the calendar /clock in that you deal only w ith seconds,
and not hours and m inutes.

On power– up all TICK timers start at 0. 0 and begin counting. You can reset the process at any
time by using the CLEAR TICK statement. The process clock cannot be preset to a value other than
0 (using CLEAR TICK).

These tick counters are separate from those used in ON TIC K.

RELATED:

C L E A R T IC K , O N T I C K

EXAMPLE:

10 CLEAR TICK 2
20 FOR X=0 TO 5000 : NEXT
30 PRINT TICK (2)
RUN

.6

ERROR:

< Data negative> - for n
< Data out of range> - if n > 2

Advertising