Using "delay" in QNX

I am using delay(1) an expecting the system to wait 1ms - I am monitoring
the
activity of my process with a digital line driven by the code. It seems that
the
code is being “kept out” for 160ms - I realise the books say that it will
not be
exactly 1ms due to scheduling of tasks etc. but 160 ms ???
I am running at almost the highest priority and I have killed off network
drivers etc. until
mine is almost the only process but still the 160ms remains … Any ideas
?

Thanks

What is your ticksize?
Find out with “ticksize”! Change to the lowest “ticksize .5”!
The shortest period is at least the ticksize.

Try the function nanosleep.

If you have the first book from Rob Krten “Getting started with QNX4”,
take a look in chapter “Timing …” under the point “Timing jitter”.

Are you alone at the priority or does somebody have a higher
priority?


Bye Sascha( sascha@bitctrl.de )

Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: sascha@bitctrl.de
WWW: http://www.bitctrl.de


“Bob miles” <rmiles@radamec.co.uk> schrieb im Newsbeitrag
news:9cb1gk$mpi$1@inn.qnx.com

I am using delay(1) an expecting the system to wait 1ms - I am monitoring
the
activity of my process with a digital line driven by the code. It seems
that
the
code is being “kept out” for 160ms - I realise the books say that it will
not be
exactly 1ms due to scheduling of tasks etc. but 160 ms ???
I am running at almost the highest priority and I have killed off network
drivers etc. until
mine is almost the only process but still the 160ms remains … Any
ideas
?

Thanks

Check to see what the tick setting is. This might explain some of the
problem. On the on the other hand, the slowest setting is 55ms?

Hmmmmmm? What type of cpu is this on?

Mitchell Schoenbrun --------- maschoen@pobox.com

Hi

The card is an SBS VP5 233 Mhz Pentium MMX

Just a repeat of what I found …

I have found that restarting a programme using the WATCOM debugger
(which I assume is what goes on in QNX when a process is started) does
something
to the tick or clock ? So that if I reset the process then manually set
ticksize to 0.5
everything is OK. But if I run from scratch there is a problem which
manifests itself in some really slow processing so that a delay request of
1ms may take 100ms.

After resetting the process the tick size is still reported as 0.5 - but
something strange has happened ?

I’m using QNX 4.22

Bob




“Mitchell Schoenbrun” <maschoen@pobox.com> wrote in message
news:Voyager.010427000406.286A@schoenbrun.com

Check to see what the tick setting is. This might explain some of the
problem. On the on the other hand, the slowest setting is 55ms?

Hmmmmmm? What type of cpu is this on?

Mitchell Schoenbrun --------- > maschoen@pobox.com