analog WaitForSingleObject for Unix or any interuptible timer
I am porting one small program on C from Windows to Linux and have got a problem. I have sort of "interruptible timer" - I implemented it using WaitForSingleObject with Event and timeout. I am waiting for some Event which can interrupt this waiting. I need to have the same on Linux platform where I am unfortunately a newbie. So my question is: if exist any way to do it - let my know if somebody know what can be used for implementation of this conception on *nix platform?
|
unix uses signals (Windows uses messages, which you call events).
Create a signal handler that will repsond to SIGALRM or SIGVTALRM. Download the free book - Advanced Linux Programming http://www.advancedlinuxprogramming.com/alp-folder |
Thank you very much for advice and link, I'll try to use it
|
All times are GMT -5. The time now is 06:09 PM. |