In article <df**********@inews.gazeta.pl>,
Rafal M <ra********@gazeta.pl> wrote:
Is it possible to create timer 9600/s in C?
If you mean a timer that invokes a signal handler 9600 times every
second, then the answer is "No, not portably".
If you mean a timer that is accurate to within 1/9600 of a second
when it is examined, then the answer is "No, not portably".
If you mean a timer that can signal an event after 9600 seconds,
then the answer is "No, not portably".
Portable C does not offer any facilities for triggering actions
after particular lengths of time (at any precision), and the
highest resolution time-of-day counter it has is clock()
which increments CLOCKS_PER_SEC times a second. I do not see any bounds
imposed on CLOCKS_PER_SEC at the moment; if I recall correctly
one of the standards imposes a minimum bound on CLOCKS_PER_SEC,
but I do not recall which standard it is.
--
Any sufficiently advanced bug is indistinguishable from a feature.
-- Rich Kulawiec