[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Peter Wang wrote:
I'm not entirely sure what you mean. The code in question is not so
much to slow down the rate at which the callbacks are called, but to
_catch up_ when necessary.
Right, but when you aim for the timer thread to loop ~100 times per
second, it will stunt performance if it can be set to loop faster, if
not cause for problems. I'm just saying I don't think it's a good idea
to aim for any particular rate to call the timer callbacks, other than
as fast as possible. I'm planning on looking through the threading code
myself to see exactly what it's doing and how, but I'd imagine you just
take the elapsed time since the last iteration, determine how many times
the timer should of been called, and call it that many number of times,
while saving any sub-whole number remainder to add to the next iteration
counter.
Meh. I suck at explaining what I mean. I'll just look through the thread
timer handler code and see what's going on.
- Kitty Cat