1
2
3
4 import sys
5 from __pyjamas__ import JS
6
7 global timeout_add
8 global timeout_end
9 timeout_add = None
10 timeout_end = None
11
12
13
14 if sys.platform not in ['mozilla', 'ie6', 'opera', 'oldmoz', 'safari']:
15 import pyjd
16
17 global timers
18 timers = None
19
20
23
24
27
28
32
33 init()
34
35
37
44
47
50
53
56
57
60
63
65 if not self.notify_fn:
66 return False
67 self.notify_fn(self.timer_id)
68 return False
69
71 if not timeout_end:
72 print "TODO: cancel timer", self.timer_id
73 self.notify_fn = None
74 return
75 if self.timer_id is not None:
76 timeout_end(self.timer_id)
77 self.timer_id = None
78
81
84
87
88
91
94
97