Results 1 to 3 of 3
Hi,
I have started a periodic timer by setitimer() system call.
Now, at application exit, I want to cancel the timer started for cleanup purpose.
can any one suggest me ...
- 06-05-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 1
How to cancel a periodic timer started by setitimer() system call?
Hi,
I have started a periodic timer by setitimer() system call.
Now, at application exit, I want to cancel the timer started for cleanup purpose.
can any one suggest me the way for implementing this?
regards
Arpit
- 06-10-2008 #2Just Joined!
- Join Date
- Jun 2008
- Posts
- 39
Get the pid of the running process, and then issue the command "kill <pid>".
- 06-10-2008 #3
If you're using setitimer(), you're using it for one or more of these kinds of timing:
- ITIMER_REAL
- ITIMER_VIRTUAL
- ITIMER_PROF
For each kind that you're actually using (or for all three, if you want to keep your code simple), call setitimer() with the second parameter as a pointer to something whose fields:
- it_interval.tv_sec
- it_interval.tv_usec
- it_value.tv_sec
- it_value.tv_usec
are all set to zero.
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote