20 ##################### ENIGMA BASE
25 self.next_activation = None
27 def start(self, msec, singleshot = False):
28 self.next_activation = time.time() + msec / 1000.0
30 self.singleshot = singleshot
37 return "<eTimer timeout=%s next_activation=%s singleshot=%s>" % (repr(self.timeout), repr(self.next_activation), repr(self.singleshot))
42 self.next_activation += self.msec / 1000.0
43 print "next activation now %d " % self.next_activation
47 running_timers = list(timers)
48 assert len(running_timers), "no running timers, so nothing will ever happen!"
49 running_timers.sort(key=lambda x: x.next_activation)
52 next_timer = running_timers[0]
55 delay = next_timer.next_activation - now
61 while len(running_timers) and running_timers[0].next_activation <= now:
62 running_timers[0].do()
63 running_timers = running_timers[1:]
74 stoptimer.start(10000)
75 stoptimer.timeout.get().append(stop)
80 ##################### ENIGMA GUI
88 eWindowStyleManager = None
92 eWindowStyleSkinned = None
94 ##################### ENIGMA CONFIG
96 import Components.config
99 "config.skin.primary_skin=None\n"
102 Components.config.config.unpickle(my_config)