User Tools

Site Tools


idle_arm_periodic_procedure_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== IDLE (arm periodic procedure) ====== Previous pageReturn to chapter overviewNext page

 

IDLE([procedure] [,separation])

blk2blue.jpg

IDLE Arms a procedure that periodically executes.
procedure The label of a PROCEDURE. The procedure may not take any parameters.
separation An integer that specifies the minimum wait time (in seconds) between calls to the procedure. A separation of 0 specifies continuous calls. If separation is omitted, the default value is 1 second.

An IDLE procedure is active while ASK or ACCEPT are waiting for user input. Only one IDLE procedure may be active at a time. Naming a new IDLE procedure overrides the previous one. An IDLE statement with no parameters disarms the IDLE process.

The IDLE procedure executes on thread one (1)–the same thread as the APPLICATION frame in an MDI application. Therefore, any WINDOW structure in an IDLE procedure must not have the MDI attribute. Since opening a non-MDI window in the same thread as the APPLICATION frame creates an application modal window, it would be more usual for an IDLE procedure not to have a WINDOW structure at all.

An IDLE procedure is usually prototyped in the PROGRAM's MAP. If prototyped in a MEMBER MAP, the IDLE statements which activate and de-activate it must be contained in a procedure within the same MEMBER module.

Example:

IDLE(ShoTime,10)     !Call shotime every 10 seconds

IDLE(CheckNet)       !Check network activity every 1 second

IDLE                 !Disarm idle procedure

See Also:

ASK

ACCEPT

PROCEDURE

MAP

MDI

idle_arm_periodic_procedure_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1