Linux timers
Hello,
I need to use four timers in my application. I am using Redhat Linux 9.0.
I came across functions like timer_create(), timer_delete()... But when I tried to call these function from my application there was linking error.
/tmp/cc0r6EtC.o(.text+0x3e): In function `main':
: undefined reference to `timer_create'
I have included following header files:
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <error.h>
#include <sys/syscall.h>
Here are my questions.
1. Am I taking the correct direction? I mean using timer_create() and other related functions.
2. Am I missing any specific header file? Do I have to link to some library? Or simply the source code for the function is missing?
3. If the source is missing, where I can find it.
4. It would be great if you could direct me to some tutorials or something that is helpful in this regard.
5. I do not think setitimer() and getitime() going to help me. I have to have different timer values for all the timers and on expiration I need to call different functions. Any thoughts?
Your help is highly appreciated.
Regards.
|