[fpc-pascal] Solution for Timer in daemon

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sat Mar 2 11:18:45 CET 2013


Michael Van Canneyt wrote:

>> On unix, an alternate solution is to use fpSelect (Function
>> fpSelect(N:cint;readfds,writefds,exceptfds:pfdSet;TimeOut:PTimeVal):cint;
>> ) and specify a time-out value.
> 
> I would go for this.

With the very minor caveat that different variants of fpSelect() hide 
the OS-specific behavior (whether the time parameter is updated on 
return) of the underlying select() call to a varying extent. It's 
particularly worth checking code that relies on this on both Linux and 
Solaris.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list