Revision fa4a0a42 util/EventScheduler.py

View differences:

util/EventScheduler.py
6 6
                self.time = 0
7 7
                self.last = 0
8 8
                self._step = 0
9
                self.counter = 0
9 10

  
10 11
        def schedule_event(self, interval, e):
11 12
                t = self.time + interval
......
17 18
                e = heapq.heappop(self.queue)
18 19
                self._step = e[0] - self.time
19 20
                self.time = e[0]
21
                self.counter += 1
20 22
                return e[1]
21 23

  
22 24
        def elapsed_time(self):
......
26 28
                return self.last
27 29

  
28 30
        def step(self):
29
            return self._step
31
            return self._step
32

  
33
        def processed_events(self):
34
            return self.counter

Also available in: Unified diff