- Action.Do method call interval

From: [at]} <Necati>
Date: Mon, 11 Jul 2005 13:28:36 +0300

----boundary-LibPST-iamunique-89827071_-_-
Content-type: text/plain

Hello Blackbox users,


Action.Do method is normally called at about 50 ms intervals if its body
is empty (measured by PrivTestAction module as shown below) in Blackbox
1.5. Is it possible to decrease this dead time 1-3 ms?. i.e., I would
like it to be called in 1-3 ms intervals.

Alternatively, I can use the following technique;
I have a long computation in a FOR loop. When the loop starts the
framework is locked until it is finished. If I would like to to stop
computation by pressing a command or command button how this can be
achieved.
(In Delphi, there was an Application.ProcessMessages procedure, when
this procedure is called in a loop I could use the buttons to exit from
the loop, that increases the computation time also)

Thanks for help,

- Necati

(******************)
MODULE PrivTestAction;
        

        IMPORT Out, Services;

        TYPE
                Action = POINTER TO RECORD (Services.Action) END;

        VAR i: INTEGER;

                action: Action;
                actionalive: BOOLEAN;
                dt0, time: LONGINT;

        PROCEDURE (a: Action) Do;
        BEGIN
                IF actionalive THEN
                        time := Services.Ticks() - dt0;
                        Services.DoLater(action, Services.now);
                        dt0 := Services.Ticks();
                END;
        END Do;


        PROCEDURE Start*;
        BEGIN
                actionalive := TRUE;
                Out.String('Started'); Out.Ln;
                Services.DoLater(action, Services.now);
                dt0 := 0;
        END Start;

        PROCEDURE Stop*;
        BEGIN
                actionalive := FALSE;
                Out.String('time (ms): '); Out.Int(time, 0); Out.Ln;
        END Stop;

BEGIN

        NEW(action);
        actionalive := FALSE;

END PrivTestAction.

PrivTestAction.Start

PrivTestAction.Stop

(* time: 50 - 55 ms *)

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-89827071_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cm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ibPST-iamunique-89827071_-_---
Received on Mon Jul 11 2005 - 12:28:36 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:12 UTC