[fpc-pascal] Various Darwin problems

Paul Davidson pdavidson at coraxnetworks.com
Tue Oct 11 14:39:04 CEST 2005


Tested some sleep and nano sleep functions.
They seems to work well, given the limits of Darwin OS.

Now tracking possible suspend/resume issues.

On Oct 11, 2005, at 8:35, Jonas Maebe wrote:

>
> 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 at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
P Davidson




More information about the fpc-pascal mailing list