|
Home > Archive > Unix Programming > August 2005 > POSIX Timer API .... disappointing
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
POSIX Timer API .... disappointing
|
|
| Generic Usenet Account 2005-08-24, 6:11 pm |
| I know that I am a lowlife programmer, and nobody gives a flip about
what I think, but that does not prevent me from expressing my deep
disappointment with the POSIX timer API. IMHO any timer API that does
not provide the following capabilities is thoroughly inadequate:
- Specifying the number of times the timer should fire
- Specifying the absolute end time when the timer should expire
- Petting an as yet unexpired timer
- Suspending/Resuming a timer
Now I know that all of these things can be realized via the
timer_create(), timer_delete(), timer_settime() and timer_gettime()
functions. In fact, I have my own implementation (posted to the csd
newsgroup), but I think it would have been far more preferable for the
POSIX working group to have standardized the API for these enhanced
timer functions.
Wish I were born about 15 years ago;-)
Gus
| |
| David Schwartz 2005-08-24, 6:11 pm |
|
"Generic Usenet Account" <usenet@sta.samsung.com> wrote in message
news:1124898700.578263.183800@f14g2000cwb.googlegroups.com...
>I know that I am a lowlife programmer, and nobody gives a flip about
> what I think, but that does not prevent me from expressing my deep
> disappointment with the POSIX timer API. IMHO any timer API that does
> not provide the following capabilities is thoroughly inadequate:
> - Specifying the number of times the timer should fire
> - Specifying the absolute end time when the timer should expire
> - Petting an as yet unexpired timer
> - Suspending/Resuming a timer
>
> Now I know that all of these things can be realized via the
> timer_create(), timer_delete(), timer_settime() and timer_gettime()
> functions. In fact, I have my own implementation (posted to the csd
> newsgroup), but I think it would have been far more preferable for the
> POSIX working group to have standardized the API for these enhanced
> timer functions.
No, that is just not the POSIX way. The POSIX way is to give you the
minimum necessary to code exactly whatever it is you want. If POSIX did it
your way, people who didn't need all the features you want would still have
to suffer the performance penalty that implementing them would require.
In this particular case, it's probably not a big deal. But the POSIX way
is to provide very simple primitives.
DS
|
|
|
|
|