[fpc-devel] fpNanoSleep vs Select()

Michael Van Canneyt michael at freepascal.org
Fri Oct 7 10:26:00 CEST 2005



On Fri, 7 Oct 2005, Ales Katona wrote:

> Hello, I'd like to ask why Sleep() function in unix world uses Select() 
> instead of fpNanoSleep()? Is there a particular reason? After a somewhat 
> riggid discussion on the channel yesterday I came up testing threading using 
> sleep() and nanosleep(). The difference in speed is huge. I'm prepared to 
> make a patch for Sleep() to use NanoSleep but I'd like to know if there are 
> any reasons again such approach.

There is no reason against this, except that I'm not sure fpNanoSleep()
exists on all platforms. Select() does.

Michael.



More information about the fpc-devel mailing list