[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
usleep, rtl_delay and clock_nanosleep performance
- To: Real Time Linux <rtl@rtlinux.org>
- Subject: usleep, rtl_delay and clock_nanosleep performance
- From: Raul <raulrtl@yahoo.co.uk>
- Date: Tue, 10 Jul 2001 17:47:14 +0100 (BST)
Hi all
I need a 25 usec delay within a rt thread. Somewhere I
read that rtl_delay() should not be used (I take it
because it is blocking), instead usleep() or
clock_nanosleep() are preferable. However when I
measured the actual delay of these functions I found
that clock_nanosleep and usleep make a wait of nearly
50 usec (somthing to do with the scheduling?) whereas
rtl_delay() is more precise, with a wait of 27 usec.
Is the use of a non-blocking function with a poorer
precission a compromise? Is rtl_delay not advisable to
use under any circunstances, even if I guarantee that
the rt thread period will be larger than 25 usec?
thanks again
Raul
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie