Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GetIt Reference Guide - syntax: n_ontick([<secondsn> [,<procedurec>]]) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_ONTICK([<secondsN> [,<procedureC>]])

Calls user defined procedure repeatedly on a regular interval.

N_ONTICK() with no parameters return time until next interrupt.

Example

* Display time of day
* refresh every 10 seconds
N_ONTICK(10,"Showtime")
  ...
PROCEDURE Showtime
attr = N_SAVEATTR()     && save screen attributes
@ 1,0 SAY TIME()
N_RESTATTR(attr)
RETURN

Notes

<secondsN> can be from 0.1 to 65535 seconds (about 18 hours). However,
timing is not precise, and you cannot use it to accurately clock real-time
events.  Also, the more frequently a procedure is called, the more it will
interfere with the normal program execution.

N_ONTICK is active at all times.  It should be disabled with N_ONTICK(0)
when not needed.

N_ONTICK() with no parameters, returns the number of seconds remaining
until the next event.

N_ONTICK(<secondsN>) with no second parameter alters the time interval
without changing the procedure.

See Also: N_ONTIME

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson