How can I speed up the timer so that my signal handler (on SIGALRM) is
called more often than the default 18.2Hz?
I have tried to reprogram the 8254 PIT, but that doesn't do anything.
Here is my code:
/* timer struct */
struct itimerval timeout;
/* set tick interrupt to 200Hz */
outportb(0x40, ((1193180L / 200) & 0x00ff));
outportb(0x40, (((1193180L / 200) >> 8) & 0x00ff));
/* Initialise timer structure */
timeout.it_interval.tv_sec = 0;
timeout.it_interval.tv_usec = 5000;
timeout.it_value.tv_sec = 0;
timeout.it_value.tv_usec = 5000;
__djgpp_clock_tick_interval = 5000;
setitimer(ITIMER_REAL, &timeout, NULL);