| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== IDLE (arm periodic procedure) ====== | [[httpwebrequesttofile.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[image draw a graphic image .htm|{{btn_next_n.gif|Next page}}]] | | || ** ** **IDLE(**[//procedure//] [,//separation//]**)** {{blk2blue.jpg|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 get one keystroke .htm|ASK]] [[accept the event processor .htm|ACCEPT]] [[procedure define a procedure .htm|PROCEDURE]] [[map declare procedure prototypes .htm|MAP]] [[mdi set mdi child window .htm|MDI]]