def simulate(self):
        """
        Run simulation loops and reschedule callbacks.
        """
        if self._simtag is not None:
            self._source_remove(self._simtag)
        self.iterate()
        timeout = min(self.timeout(), 0.01)
        if timeout is None:
            timeout = 0.01
        self._simtag = self._timeout_add(
            int(timeout * 1000), self.simulate,
            priority=self._glib.PRIORITY_DEFAULT_IDLE)

        Run simulation loops and reschedule callbacks.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/_glibbase.py