Re: [AD] Undocumented number of timer functions |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Grzegorz Adam Hankiewicz wrote:
The documentation doesn't say explicitly how many timer functions
a user can register. A small test under linux gives me about
1000 timers before install_int returns different than zero.
I think your test is wrong.
What
about other platform restrictions? Even if possible, should the
documentation recommend to not install more than X timers for
performance issues or portability?
Timer drivers can implement their own install_int, etc. methods but I
don't think any of them do. In that case they fall back on the default
implementation in timer.c, which can only hold 16 timers (see MAX_TIMERS
in aintern.h). Moreover, Allegro can use some of these itself (a quick
look: mouse cursor drawing, keyboard rate handling, MIDI playing, the
digital sound sweep effect and FLIC playing can all use timer interrupts).
Peter