Re: [AD] timer interupt .. 1ms minimum ????

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> 1. djgpp, on DOS or FreeDOS

The only limit I see in pure DOS is in src/dos/dtimer.c:var_timer_handler()

  /* fudge factor to prevent interrupts coming too close to each other */
   if (new_delay < 1024)
      timer_delay = 1024;
   else
      timer_delay = new_delay;

The unit is here the PC clock tick (1193181 ticks a second).

> 2. possibly  win32,  win2k.  msvc

For the 4.0.x series: src/win/wtimer.c:tim_win32_handle_timer_tick()

   /* fudge factor to prevent interrupts from coming too close to each other
*/
   if (new_delay < MSEC_TO_TIMER(1))
      new_delay = MSEC_TO_TIMER(1);

For the 4.1.x series: src/timer.c:_handle_timer_tick()

#ifdef ALLEGRO_WINDOWS
   /* fudge factor to prevent interrupts from coming too close to each other
*/
   if (new_delay < MSEC_TO_TIMER(1))
      new_delay = MSEC_TO_TIMER(1);
#endif

Don't forget that removing the limitation consistently freezes Win98SE on my
box with very fast timers.

- Eric






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/