(For 2) As I understand, the statements order doesn't affect the performance. 
Both statements must be
-- checked every cycle. This order is the best bet only when 
math.mod(foo_interval/update_interval) = 0
-- Again, this only works for foo_interval values bigger than update_interval 
[...]
-- To solve this we need another statement, and this function is a bug itself.  
Lets move on.

3-) A boolean variable. I mean, two states ~ two time intervals:

        function update_foo()
                local fetch = [some condition] and fetch_something() or false
                foo_timer:set( ... )  --> fetch_something() controls the actual 
timer.
        end

-- Here, [some condition] depends on your code. May be this is the better way, 
but quite obscure-bizarre
   for some people.

(You will see it implemented on statusd_flashing.lua if Tuomo accepts to put it 
on-line)

* If you are asking for some deep (de profundis) hacks on ioncore...
  I'd like to hear too if its fair and clean to do this from "inside".

Bye!

-- 
Can't find yet 'GH --quiet' option. I'll try.
Mario G.H.

Reply via email to