problems using setitimer
problems using setitimer
- Subject: problems using setitimer
- From: michael <email@hidden>
- Date: Mon, 8 Nov 2004 15:14:23 -0500
I have an app that relies on "setitimer" to filter repetitive inputs from
a RF receiver.
The transmitter sends multiple copies of a message, and once I've seen a good
one, I want to ignore any duplicates for 'some time'.
This code is in a commercial app that has been released for 8 months, and
only a small number of users have reported this problem.
The problem is that the function suddenly begins to report errors for
every attempt to 'reset' it, and only terminating the task will regain use
of the timer.
I use the form :
theErr = setitimer(ITIMER_REAL, iReset, NULL);
The value at iReset is set once at the start of the task, and never gets
changed. The value is established by :
iReset.it_interval.tv_sec = 0;
iReset.it_interval.tv_usec = 0;
iReset.it_value.tv_sec = 0;
iReset.it_value.tv_usec = 600000;
I have put test code inside the main loop that will announce
any changes to the values. It has never reported any change.
The Error Code I get is : 22
which according to sys/errno.h is "EINVAL" which means "Invalid Argument"
Before I spend more time with this, I thought I should write to this
list and see
if someone else has seen such a case.
If no one has such experience, perhaps someone could point me to the open
source that manages these timers ?
thanks very much
michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden