On 11 okt 2005, at 14:25, Felipe Monteiro de Carvalho wrote:
The sleep was changed from select to nanosleep. It seems OS X
doesn't accept
sleeps smaller than 10ms.
That is not true. This program takes half a second on my machine:
This only happens because you are getting a very big time period on
your test. Sleep, nanosleep and all other timing procedures are simply
*not* reliable when you want a microsecond or 1milisecond precision.
This kind of precision is achieved throught other means, such as
special device drivers, interruptions, real-mode, etc.
You're completely right they are not reliable. Also, you must always
remember that nanosleep() can return before it has waited for the
specified time (that's what the second parameter is for) because of
delivery of a signal.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal