Your array will grow indefinitely. Not a viable solution, it seems to me.
Incidentally someone else posted a round robin database solution. It's probably the way to go. That's more or less where I was headed with quantizing offsets.
Incidentally someone else posted a round robin database solution. It's probably the way to go. That's more or less where I was headed with quantizing offsets.
However, now that I think about it increment() could called multiple times during a single nanosecond, in which case I guess it would be multiplied by whatever the maximum number of executions per nanosecond would be. My once per nanosecond comment earlier was an erroneous assumption.
(Hint: google round robin database. You know, the solution that I mentioned.)
1: http://jawnsy.wordpress.com/2010/01/08/round-robin-databases...