LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Timed execution of a function (https://www.linuxquestions.org/questions/programming-9/timed-execution-of-a-function-178896/)

arvind_tyche 05-07-2004 07:35 AM

Timed execution of a function
 
Hi,

sometime back I used open GL on Tru 64, I had used a call to register a function to get executed after some interval. Now I need help on AIX, I need to execute a function after some interval. using pthreads is one alternative I have but need to know is that feature there or not.
I found a timeout utility in sys/streams.h, but it is only for _KERNEL...I wonder what should be done if I need timed invocation. Signals & using sigalrm is also a work around.
Pls tell me if a function exists which does the sigalrm thing internally....?
thanks a lot for all who read .... respond !!

Hko 05-07-2004 08:25 AM

Not sure, and I don't know AIX nor Tru64, but you may want to check these functions (see their man pages):

sleep(), usleep() or nanosleep()
alarm()
setitimer()
pause()


All times are GMT -5. The time now is 11:33 PM.