I'm still not getting the actual scenario where you really need beyond 2 priority levels. The current scheme logs the fast stuff fast, and the slow stuff reasonably fast with very little performance hit on the fast stuff, while keeping the logging interval constant at all times. Adding a third priority level wouldn't make the fast stuff any faster, and could only make the slow stuff a little faster, so it doesn't really seem that helpful.
Put another way, assuming the fast stuff is fast enough, unless you have a really long list of slow stuff to log, the slow stuff should be acquired at a reasonable speed too (probably faster than the intervals you currently have them set to). Can you give me a sample of what you are typically logging with your software (I don't care what the params are, just a count of how many at what intervals). I could do a different scheme with phased modulo counters similar to what you are doing but that gives a more tightly optimized worst-case sampling interval, but I'm just not sure it's worth the users time to be messing with the sampling periods of individual parameters so finely.
Tephra wrote:good stuff Colby.
I am still hanging out for an slightly improved priority scheme, yours or mine - doesn't matter.
