|
|
| allegro timer effeciency |
|
A J
Member #3,025
December 2002
|
do the allegro timers create much overhead ? ___________________________ |
|
miran
Member #2,407
June 2002
|
Uneducated guess: no to both questions. -- |
|
HoHo
Member #4,534
April 2004
|
Since Allegro timers use threads and are executed at most as fast as OS swiches tasks then I think they might not be the best thing to time stuff. Afaik on XP and most *nixes timers run around evert 10msec at most, not much faster. The speed impact they have is probably quite small unless you have vast amount of timers updating hudreds of times per second. If all you need is some number that automatically gets incremented as fast and accurately as possible then best bet would be to use system specific things like gettimeofday and query_performance counter. [edit] __________ |
|
Kitty Cat
Member #2,815
October 2002
|
Quote: if i dont use them at all could i expect much better timing in the rest of the app ? If you don't ever call install_timer, or call anything that needs a timer (keyboard, mouse, sound, midi.. anything that processes in the background), then you'll probably save on the creation of a thread. Though it won't do much for performance since the thread is going to be sleeping more often than not, anyway. All the other background processes are going to have a significantly bigger impact than that one thread. In otherwords, the savings would be negligible. -- |
|
gillius
Member #119
April 2000
|
Allegro's timers on Win32 are very inaccurate but do have a low overhead. Gillius |
|
Thomas Fjellstrom
Member #476
June 2000
|
Hmm, doesnt the keyboard driver use a timer? I'm pretty sure that the timer system is inited even if you dont ask it to. -- |
|
Kitty Cat
Member #2,815
October 2002
|
I said: If you don't ever call install_timer, or call anything that needs a timer (keyboard, mouse, sound, midi.. anything that processes in the background)
-- |
|
Thomas Fjellstrom
Member #476
June 2000
|
Oops -- |
|
|