Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_ontime( [ <nseconds> [, <cprocedure>|<nkey> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_ONTIME( [ <nSeconds> [, <cProcedure>|<nKey> ] )


Parameters

<nSeconds>
Interval after which the procedure will be called. Can be from 0.1 to 
921, 825 seconds (just over 256 hours, or more than 10 days).

<cProcedure>
Name of a procedure to execute.

<nKey>
ASCII value of a key to stuff onto the keyboard.


Returns

The number of seconds remaining until the event.


Description

This function works similarly to N_ONTICKn() except that rather than 
calling an event procedure repeatedly, N_ONTIME() calls it just once, 
and then the event is removed from the event table. 
N_ONTIME(<nSeconds>) with no second parameter alters the interval 
without changing the procedure. N_ONTIME(0) deactivates the event trap.

The event trap is active during a wait state and also while Clipper is 
executing commands such as INDEX ON. However, the event will not be 
processed when Clipper is not in control, as when you RUN a DOS 
command, or during stream I/O, as when you issue COPY FILE. In those 
cases the event will be handled as soon as the external operation has 
been completed.


Example

// Terminate demo program after 10 minutes.
N_ONTIME(600, 'EXITDEMO')
.
.
.
PROCEDURE ExitDemo
   CLEAR ALL
   QUIT
RETURN



See Also: N_ONTICKn()

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