Ejemplo n.º 1
0
def simulate():
    """Run simulation loops and reschedule callbacks.
    """
    global _simtag
    if _simtag is not None:
        gtk.timeout_remove(_simtag)
    timeout = main.runUntilCurrent()
    if timeout is not None:
        _simtag = gtk.timeout_add(timeout * 1010, simulate) # grumble
Ejemplo n.º 2
0
def simulate():
    """Run simulation loops and reschedule callbacks.
    """
    global _simtag
    if _simtag is not None:
        gtk.timeout_remove(_simtag)
    timeout = main.runUntilCurrent()
    if timeout is not None:
        _simtag = gtk.timeout_add(timeout * 1010, simulate)  # grumble
Ejemplo n.º 3
0
 def simulate(self):
     if self.cancelled:
         return
     global _sim
     if _sim is not None:
         _sim.cancel()
     timeout = main.runUntilCurrent()
     if timeout is not None:
         _sim = Simulator()
         _root.after(int(timeout * 1010), _sim.simulate)