----boundary-LibPST-iamunique-351195142_-_-
Content-type: text/plain
W et al,
Here is what I previously said with regard to HostMenus.idlePeriod (not
exported).
-Doug
(been sick with a nasty flu)
skulski{([at]})nowhere.xy
> Doug:
>
> does this mean that one can simply set idlePeriod to 1 and get 1 ms
> turnaround time? I cannot investigate timing right now because
> I am way behind with preparing the experiments we are running
> at the current timer rate. However, if increasing the speed
> is as simple as changing one number, that would be great.
You goaded me into trying it! I wasn't sure whether HostMenus was wired
into BlackBox.exe or loaded as a module but anyway I changed the idle
time from 50ms to 1ms recompiled and rebooted BlackBox.
It did change the response and nothing crashed!
The new measured response time was 10ms.
So you can get a factor of 5 but not a factor of 50 speedup.
-Doug
Wojtek Skulski wrote:
> Hi:
>
> there was an active discussion of this topic not long ago.
> Doug Danforth posted a subsystem that uses Windows multimedia.
> Getting down to 1 ms is tough. BlackBox is called from the Windows
> event loop that limits the speed to tens of ms. There is a constant
> in HostMenus (if I recall correctly). When you edit this, you can get
> down to about 10 ms. Getting below 10 ms requires the multimedia timer,
> and that is not part of BB. Let's see what Doug says, or e-mail him
> directly.
>
> Meanwhile, look at XYplane. It has the procedure ReadKey that
> just reads the key from the keyboard. You can call it inside the
> computation. Furthermore, since XYplane source is now available
> in BB 1.5 Beta, you can see how to do such things.
>
> W.
>
> On Mon, 11 Jul 2005, Necati Ecevit wrote:
>
>
>>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
>>
>>
>
>
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
>
>
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-351195142_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx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