Re: [iPAQ] usleep

From: Philip Blundell <pb.a.t.nexus.co.uk>
Date: Tue Apr 13 2004 - 10:54:59 EDT

On Tue, 2004-04-13 at 14:57, Valentin Longchamp wrote:
> I would like some information about the usleep fonction : does it work
> with small values ??? Because i've got very funny behaviours with small
> arguments (I mean about 10 microseconds) ... I need that resolution
> because I'm trying to control a robot !!!

Under realtime scheduling policies (SCHED_RR or SCHED_FIFO), this should
work fine down to about 10us. System calls have a fixed overhead of
about 500ns, so usleep's accuracy will fall off significantly as you
approach 5us or so.

Of course, interrupt routines can still screw you up. It wouldn't
surprise me at all if there are irq handlers on the ipaq that take
significantly more than 10us to execute. If this is going to be a
problem, you might have to look at RTLinux instead.

p.
Received on Tue Apr 13 14:55:28 2004

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:45:09 EDT