Daryle Tilroe;276734 Wrote: 
> 
> Well if you are doing that then the whole checkOnOff() is sort of
> redundant.  You could probably simplify it. 

Not really.  You could get a timer notification when the timer was on,
and you'd still need to check when it was turned off

> 
> OTOH, as you note, the polling allows one not to have to check for all
> sorts of conditions like transitions in the player state and changes in
> the on/off times.  Actually doesn't the setTimer routine cycle every
> time slice (second?) anyhow.  Aren't all those extra
> calculations/functions called (ie. nextTime) somewhat more of a load?

setTimer() only gets called from checkOnOff(), and checkOnOff() is only
called if a: the timer fires (twice a day per enabled player), b: a
change in state takes place (player on/off, only a few times a day, or
new player detected, even less often, probably), or c: you change the
options (very infrequently).  I have no idea how the timer mechanism in
SqueezeCenter is implemented.  I'd assume as a priority queue, and this
would be way down that queue most of the time.

Anyhow, it works, and this probably isn't the best forum for a
code/design review.

Eric


-- 
kolding

SliMP3 -> the closet
SqueezeBox 1 -> Bose Soundwave
SqueezeBox 2 -> Rotel RSX-1056 -> Totem Acoustic Dreamcatchers
SqueezeBox 3 -> Rotel RX-1052 -> Vandersteen 1B's
------------------------------------------------------------------------
kolding's Profile: http://forums.slimdevices.com/member.php?userid=31
View this thread: http://forums.slimdevices.com/showthread.php?t=43104

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to