the original post was re qnx4 so that’s why i responded in that vein.
in neutrino, you use ClockPeriod to adjust your clock… but current
neutrino only lets you set it to 0.5 msecs at the lowest.
my understanding is that this limit will be dropped in the future…
but this timer interval is still the rate that irq0 or equiv will get
fired at.
if you run on x86 you could use the other timers of the 8254… you can
seed these with a countdown value and get an irq from them. there are many
many free libs on the web that show how to do this… we had one posted
in our free software section called Microtime … it was a qnx4 program
but the part that hits the timer chip would be the same logic.
Travis Griggs <tgriggs@keyww.com> wrote:
Randy Martin wrote:
all the timers in qnx4 are based on the resolution of the current
ticksize.
delay calls nanosleep which in turn calls timer_create with a realtime
timer.
if you run ‘ticksize -e’ what does it say? as root you can set this
tickvalue to lower than .5ms if you use the -e option (nanosecs)
e.g. on my machine i use:
ticksize -e 99733
to get 100usec resolution.
be aware though that ticksize will determine how often an irq0 will fire off.
so every app that has a handler for irq0 will run every tick. plus the
kernel will run every tick and need to update internal timers etc.
note: current qnx is 425 … there are a number of enhancements and fixes
since 422 which is quite old now.
What if I am using 6? I think that’s what I’m allowed to download off of
their website. find / -name ticksize turns up nothing under RTP. The
above indeed sounds like what we want. We just want to get down to a
250usec period.
Travis Griggs (a.k.a. Lord of the Fries)
Member: 3rd Boolean State Software Collective
Key Technology
“It had better be a pretty good meeting to be better than no meeting at
all”-- Boyd K. Packer
–
Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579