Hi, I need some advice implementing timers in a multithread aplication on linux 
(suse 9.3, kernel 2.6.11).
The application is written in C.
At first, I chose to use alarm() with a handler for SIGALRM, but after some 
tests I concluded tht it's not wise to use this in a multithread application, 
since it seems that each call to alarm() affects or even cancels the previous 
one, even though the previous call was in another thread.
Do I miss here something? may this still be used in a multithread application?
Yes, I know about getitimer and setitimer, but I do not understand how to 
adjust the timer, for example if I want a timer of 20 seconds.
If this is the solution you suggest, please provide an example that shows how 
to use those functions.
Generally, any advise concerning this issue will be most appreciated.
Thanks, Rafi.
-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.6/617 - Release Date: 1/5/2007 11:11 
AM

Reply via email to