----boundary-LibPST-iamunique-367555595_-_-
Content-type: text/plain
Doug:
This discussion was great for me! I will investigate all this.
In my present case I do not need very precise timing because we
mainly investigate temperature drifts that are slow by nature.
However, we need better than 1 second, so the UtilTime will
be of great help.
Now I have an even more provocative question. Using the knowledge
from this discussion, would it be possible to make the BB tasker
run faster than its present 20 Hz?
If I would have to formulate a single biggest complaint about BB,
it would its tasking system Services. First, it is slow. Twenty
Hertz is only frequent enough for non-demanding data acquisition.
This is our case right now, but I am thinking of more serious DAQ.
For example, USB buffers arrive every 1 ms under USB 1.1, and even
more frequently under USB 2.0. The 20 Hz tasker is not fast enough
even for USB 1.1, not to mention 2.0.
Second, and perhaps even worse, the Services tasker stops as soon
as you press a mouse key. (Try ObxCubes. Open Help->Examples->
ObxCubes and press the mouse key. The rotating cubes stop rotating
until the key is released.) This is a big "no" for data acquisition.
Would it be possible to speed up the Services loop to say 1kHz,
or perhaps even faster? Would it be possible to keep it running
when a mouse key is pressed?
I know this question is getting quite deep under the hood.
But certainly the BB community has enough knowledge to propose
a solution (or to prove it cannot be done).
Note I am not complaining about a single-process tasking.
IMHO a single-process multitasking is a simple and brilliant design
carried over from the original Oberon System. However, a single-process
tasker does not necessarily have to use a 20 Hz clock, nor it has
to depend on the mouse tracking loop. I am thinking that a more efficient
timing could possibly be used. Any idea if this is possible?
Thanks a lot,
W.
On Thu, 21 Apr 2005, Douglas G. Danforth wrote:
> Gérard,
> Very nice!
>
> Wojtek,
> If you do not need to know the absolute time to less than 1 second you
> can use Dates.GetTime and then from that point use UtilTime for precise
> relative events.
> -Doug
>
>
> Gérard Meunier wrote:
> > Doug,
> >
> > With this test program, I get a resolution of 3.4 µs on WIN98 600 MHz, and
> > 0.83 µs on XP 1700 MHz:
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-367555595_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFu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