%dl - Timer

Purpose

To set a call-back function to be called at regular intervals via a timer.

Syntax

winio@('%dl',interval,cb_func)
double precision interval     (input)
external cb_func

Description

interval is the minimum time in seconds between calls. A call is made at idle time (e.g. awaiting input) and when YIELD_PROGRAM_CONTROL@ is called. A given window cannot have more than one timer.

Notes

The timer delay used with %dl can be changed dynamically using the following routines.

SUBROUTINE CHANGE_TIMER_INTERVAL@( HWND, INTERVAL )
INTEGER(7) HWND
DOUBLE PRECISION INTERVAL

SUBROUTINE SET_TIMER@( HWND, INTERVAL, CALLBACK )
INTEGER(7) HWND
DOUBLE PRECISION INTERVAL
INTEGER,EXTERNAL::callback

SUBROUTINE KILL_TIMER@( HWND, CALLBACK )
INTEGER(7) HWND
DOUBLE PRECISION INTERVAL
INTEGER,EXTERNAL::callback

HWND is the handle of the parent window (obtained using %hw (Handle)). INTERVAL is the replacement for the value used with %dl.

Example

winio@('%dl', 2.0D0, cb_func)

 

 

 

Basket
Empty
 
Copyright © 1999-2020 Silverfrost Limited