Il 25/08/2014 15:54, Radoslaw Kudaj ha scritto:
Hi,
I need to generate microseconds sleep (in microseconds resolution) on QNX 6.6.0.
As time tick on the QNX system is 1 ms functions: "clock_nanosleep()" and
"nanosleep()" do not provide microseconds sleep accuracy.
Is there any other reliable method to sleep over such short period of time (other than nanospin() function which consumes too much CPU)?
thank you for any help,
regards
A reliable usleep may dependes by platform/CPU You are using and if
You can allows or not a preemption during usleep .
If Your system has an hardware timer available , you can use it to
generate an
interrupt for You and do works in ISR or just send a pulse to an
interrupt thread.
Or You can read the timer in a loop and exit after the desidered us are
elapsed
Mario wrote: