[fpc-pascal] lnet for TCP daemon

Marco van de Voort marcov at stack.nl
Wed Sep 18 15:57:36 CEST 2013


In our previous episode, Henry Vermaak said:
> > > Should be doable, as well. AFAIK, mse (for Linux) uses signals on that 
> > > behalf. We might want to steal some ideas there.
> > 
> > While there is sigalarm, but can you have multiple independent timers in an
> > application that way?
> 
> I think Martin used setitimer and handles multiple timers by calculating
> which one expires first, and subtracting that amount from the other
> timers, etc.

That's a trick commonly done on embedded platforms with limited timers (I
actually did it once as part of a course that created a small RTOS for 8051
chips), but on *nix systems where libraries might also reserve certain
itimers, that could fail miserably.




More information about the fpc-pascal mailing list