[fpc-pascal] Various Darwin problems
jonas.maebe at elis.ugent.be
Tue Oct 11 14:35:16 CEST 2005
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.
More information about the fpc-pascal