??? 08/07/08 20:48 Modified: 08/07/08 20:49 Read: times |
#157303 - the correct use takes care of this Responding to: ???'s previous message |
The trouble with using arrays is that you always have to loop through every single element to check for "running" timers.
the correct use takes care of this: 1) do not willy-nilly "just add a timer" if one is used in intitalize, the same can be used during run. 2) the number if each type of timer is defined as the minimum and not just "set to enough" 3) the only place you will see a difference is in the 1ms (and possibly in the 10ms) 4) instead of a complex, "add this to the list" routine you just do timer[x] = y; 5) the 'user' only need if (timer[x]), not "find my entry in the list" and I believe that all that finding will take more time that a few bytes checked every ms not the least since all arithmetic is 8 bit and not constant (16 bit) pointer modification. Erik |