On Tuesday 04 November 2003 14:43, Ehud Karni wrote:

> I tested the select call on various machines.
>   1. It is not accurate enough (2 ms deviations).

Yes it does,  you don't seem to use sched_setscheduler in your test program to 
give your proccess real time priority. setpriority only changes the nice 
level of the proccess. If you want real time guantees (which you do here) you 
need to ask the kernel to subject your proccess to real time scheduling.

>   2. It can not be used for delays < 10 ms.

Unless you recompile the kernel, you are correct.

>
> Here is my solution (my_usleep) embedded in a test program.
> This function has an accuracy of about 1 micro second.

No it doesn't. Without real time priority the select is not guranteed to wake 
up on time. You can easily miss your mark and over sleep.

Gilad

-- 
Gilad Ben-Yossef <[EMAIL PROTECTED]>
Codefidence. A name you can trust (tm)
http://www.codefidence.com

"Half of one of my eyes is already open. I'm going to make coffee now..."
        -- Kathi 16:08:04


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to