ms   di   ei   int!   TICKS   MS-TICKS

ms ( n ---)

Waiting in millisencondes

Example:

500 ms \ detay for 1/2 second

For long waits, set a wait word in seconds:

: seconds ( n --)
    0
    for
        1000 ms
    next ;
12 seconds \ delay for 12 seconds

Specific Flash Forth

CAUTION the word ms blocks all others process. For long expectations, it is advisable to split the wait long in a succession of short expectations in a loop-type begin..until for example.

di ( ---)

Specific Flash Forth

Disable interrupts.

ei ( ---)

spécifique Flash Forth

Enable interrupts.

int! ( xt vector-no ---)

Specific Flash Forth

Store interrupt vector to table.

See: Interrupt vector tables

TICKS ( --- u)

System ticks. One tick per millisecond.

Useful for measuring the execution time of a definition. Example:

: tempo ( n ---)
    >r ticks r> 
    for next 
    ticks 
    swap - .
 ; 
1000 tempo \ display 2
\ result 2 is the execution time in milliseconds
\ for for..next loop

MS-TICKS ( -- n )

Specific ESP32forth

System ticks. One tick per millisecond.

Useful for measuring the execution time of a definition.