Hello,

I need a function (that exactly skips current track for current program to
retrieve new one from new program, when new program time comes), that will
be executed at special periods of time (that are received from external
scripts).

Currently i'm using following logic:
1) Receive timeout from php
2) Setup timeout for function
3) When function is being executed - it receives new timeout and returns it

Problem comes when it's necessary to change current timeout, that is
already set (for example, user changed his broadcasting schedule).
For more understanding, see for following cases:
1) timeout is set up, function will be called in one hour. but user changed
his timetable and now new program should start in 10 minutes, so my
function should be called in 10 minutes!
2) timeout is set up, function will be called in 10 minutes. But user
changed his timetable and now new program should start in 1 hour. My
function will just skip track without any reason.

I've tried to use references here.. but this didn't help, you can find code
i've used to try:
http://pastebin.com/BgpnqiAF

So, it is possible somehow to change current timeout that was set by
add_timeout function?

If not, i had another idea for implementation:
1) Make variable, referenced to next program start time
2) Make timeout function, that is being executed every minute, and checks
variable from point 1. If time came - timeout function will execute some
special logic (like skipping current track, etc)

Is this idea ok? How this will affect resources consumption?

-- 
Kind regards,
Alexander.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to