ticksize

Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a command that
will tell me the current value? If it is set to 1ms as the docs state it
should be, is that about as low as you want to go in QNX 6?

TIA,

Jim

Jim Lambert <jlambert@futurex.com> wrote:

Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a command that
will tell me the current value? If it is set to 1ms as the docs state it
should be, is that about as low as you want to go in QNX 6?

No utility. Shouldn’t be hard to write one – look at the clock_setres()
and clock_getres() functions for modifying it. It can be taken lower, but
I’m not sure how much lower – the OS will reject a value below a certain
amount.

-David

QNX Training Services
dagibbs@qnx.com

I don’t see a clock_setres() on my QNX 6 system. :frowning: Ok, its not documented
in the help but does show up in the time.h header. Is it safe to use?

TIA,

Jim

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:9k9kko$q0r$1@nntp.qnx.com

Jim Lambert <> jlambert@futurex.com> > wrote:
Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a command
that
will tell me the current value? If it is set to 1ms as the docs state
it
should be, is that about as low as you want to go in QNX 6?

No utility. Shouldn’t be hard to write one – look at the clock_setres()
and clock_getres() functions for modifying it. It can be taken lower, but
I’m not sure how much lower – the OS will reject a value below a certain
amount.

-David

QNX Training Services
dagibbs@qnx.com

Guess not. :frowning: When I compile, it gives me an “undefined reference to
clock_setres” error. I guess that is why it isnt in the docs anymore,
because it isnt used anymore. Am I right?

Jim

“Jim Lambert” <jlambert@futurex.com> wrote in message
news:9ka31p$5g6$1@inn.qnx.com

I don’t see a clock_setres() on my QNX 6 system. > :frowning: > Ok, its not
documented
in the help but does show up in the time.h header. Is it safe to use?

TIA,

Jim

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:9k9kko$q0r$> 1@nntp.qnx.com> …
Jim Lambert <> jlambert@futurex.com> > wrote:
Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a command
that
will tell me the current value? If it is set to 1ms as the docs state
it
should be, is that about as low as you want to go in QNX 6?

No utility. Shouldn’t be hard to write one – look at the
clock_setres()
and clock_getres() functions for modifying it. It can be taken lower,
but
I’m not sure how much lower – the OS will reject a value below a
certain
amount.

-David

QNX Training Services
dagibbs@qnx.com

Hi - Sorry I don’t have a RTP box running at the moment, but I seem to recall
something about get/setConfString or some such. They take named strings and
return the requested value - or set it. As I recall, you can get the tick size
but not set it this way. I think there are utilities to do this for you as well,
but I might have written the ten lines it takes to use use the lib routines.
Next time I have RTP running I’ll look it up.

Phil

Jim Lambert wrote:

Guess not. > :frowning: > When I compile, it gives me an “undefined reference to
clock_setres” error. I guess that is why it isnt in the docs anymore,
because it isnt used anymore. Am I right?

Jim

“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:9ka31p$5g6$> 1@inn.qnx.com> …
I don’t see a clock_setres() on my QNX 6 system. > :frowning: > Ok, its not
documented
in the help but does show up in the time.h header. Is it safe to use?

TIA,

Jim

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:9k9kko$q0r$> 1@nntp.qnx.com> …
Jim Lambert <> jlambert@futurex.com> > wrote:
Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a command
that
will tell me the current value? If it is set to 1ms as the docs state
it
should be, is that about as low as you want to go in QNX 6?

No utility. Shouldn’t be hard to write one – look at the
clock_setres()
and clock_getres() functions for modifying it. It can be taken lower,
but
I’m not sure how much lower – the OS will reject a value below a
certain
amount.

-David

QNX Training Services
dagibbs@qnx.com

Jim

Try the following example:


#include <iostream.h>
#include <sys/neutrino.h>

int main() {

_clockperiod myPeriod;

myPeriod.nsec = 500000;
myPeriod.fract = 0;

ClockPeriod(CLOCK_REALTIME, &myPeriod, NULL, 0);
ClockPeriod(CLOCK_REALTIME, NULL, &myPeriod, 0);

cout << “new clock period: " << myPeriod.nsec << " [ns]\n”;

return 0;
}


Run this program as root.
500 usec is the lowest value Neutrino accepts.

Marcel


“Jim Lambert” <jlambert@futurex.com> wrote in message
news:9ka3ou$5qr$1@inn.qnx.com

Guess not. > :frowning: > When I compile, it gives me an “undefined reference to
clock_setres” error. I guess that is why it isnt in the docs anymore,
because it isnt used anymore. Am I right?

Jim

“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:9ka31p$5g6$> 1@inn.qnx.com> …
I don’t see a clock_setres() on my QNX 6 system. > :frowning: > Ok, its not
documented
in the help but does show up in the time.h header. Is it safe to use?

TIA,

Jim

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:9k9kko$q0r$> 1@nntp.qnx.com> …
Jim Lambert <> jlambert@futurex.com> > wrote:
Hi All,

Anyone know how to adjust the ticksize in QNX 6 or at least a
command
that
will tell me the current value? If it is set to 1ms as the docs
state
it
should be, is that about as low as you want to go in QNX 6?

No utility. Shouldn’t be hard to write one – look at the
clock_setres()
and clock_getres() functions for modifying it. It can be taken lower,
but
I’m not sure how much lower – the OS will reject a value below a
certain
amount.

-David

QNX Training Services
dagibbs@qnx.com
\

Jim Lambert <jlambert@futurex.com> wrote:

I don’t see a clock_setres() on my QNX 6 system. > :frowning: > Ok, its not documented
in the help but does show up in the time.h header. Is it safe to use?

Oops, sorry. My fault… I was hallucinating. Should have said
clock_getres() for query, ClockPeriod() for setting or querying.

-David


QNX Training Services
dagibbs@qnx.com