def __init__(self):
self.timeout = slot()
self.next_activation = None
+ print "NEW TIMER"
def start(self, msec, singleshot = False):
+ print "start timer", msec
self.next_activation = time.time() + msec / 1000.0
self.msec = msec
self.singleshot = singleshot
assert len(running_timers), "no running timers, so nothing will ever happen!"
running_timers.sort(key=lambda x: x.next_activation)
+ print "running:", running_timers
+
next_timer = running_timers[0]
now = time.time()
def playService(self, service):
return None
+ def __repr__(self):
+ return "pNavigation"
+
eRCInput = None
getPrevAsciiCode = None
##################### ENIGMA CHROOT
+print "import directories"
import Tools.Directories
+print "done"
chroot="."
##################### ENIGMA CONFIG
+print "import config"
import Components.config
+print "done"
my_config = [
"config.skin.primary_skin=None\n"
##################### ENIGMA STARTUP:
def init_nav():
+ print "init nav"
import Navigation, NavigationInstance
NavigationInstance.instance = Navigation.Navigation()
def init_record_config():
+ print "init recording"
import Components.RecordingConfig
Components.RecordingConfig.InitRecordingConfig()
def init_parental_control():
+ print "init parental"
from Components.ParentalControl import InitParentalControl
InitParentalControl()
#enigma.reset()
def test_timer(repeat = 0, timer_start = 3600, timer_length = 1000, sim_length = 86400 * 7):
- print "loading RecordTimer"
- import RecordTimer
- print "ok"
+ import NavigationInstance
at = time.time()
- t = RecordTimer.RecordTimer()
+ t = NavigationInstance.instance.RecordTimer
+ print t
+ print "old mwt:", t.MaxWaitTime
t.MaxWaitTime = 86400 * 1000
+
+ # hack:
+ NavigationInstance.instance.SleepTimer.MaxWaitTime = 86400 * 1000
+
+ t.processed_timers = [ ]
+ t.timer_list = [ ]
+
# generate a timer to test
import xml.dom.minidom
+ import RecordTimer
timer = RecordTimer.createTimer(xml.dom.minidom.parseString(
"""
time.tzset()
#log(test_timer, test_name = "test_timer_repeating", base_time = calendar.timegm((2007, 3, 1, 12, 0, 0)), repeat=0x7f, sim_length = 86400 * 7)
-log(test_timer, test_name = "test_timer_repeating_dst_start", base_time = calendar.timegm((2007, 03, 20, 0, 0, 0)), repeat=0x7f, sim_length = 86400 * 7)
+log(test_timer, test_name = "test_timer_repeating_dst_skip", base_time = calendar.timegm((2007, 03, 20, 0, 0, 0)), timer_start = 3600, repeat=0x7f, sim_length = 86400 * 7)
+#log(test_timer, test_name = "test_timer_repeating_dst_start", base_time = calendar.timegm((2007, 03, 20, 0, 0, 0)), timer_start = 10000, repeat=0x7f, sim_length = 86400 * 7)