'Schedule a call to C{self.runUntilCurrent}.  This will cancel the
currently scheduled call if it is already scheduled.
@param force: Even if there are no timed calls, make sure that
C{runUntilCurrent} runs immediately (in a 0-seconds-from-now
C{CFRunLoopTimer}).  This is necessary for calls which need to
trigger behavior of C{runUntilCurrent} other than running timed
calls, such as draining the thread call queue or calling C{crash()}
when the appropriate flags are set.
@type force: C{bool}'

def _scheduleSimulate(self, force=False):

    if (self._currentSimulator is not None):
        CFRunLoopTimerInvalidate(self._currentSimulator)
        self._currentSimulator = None
    timeout = self.timeout()
    if force:
        timeout = 0.0
    if (timeout is not None):
        fireDate = (CFAbsoluteTimeGetCurrent() + timeout)
        def simulate(cftimer, extra):
            self._currentSimulator = None
            self.runUntilCurrent()
            self._scheduleSimulate()
        c = self._currentSimulator = CFRunLoopTimerCreate(kCFAllocatorDefault, fireDate, 0, 0, 0, simulate, None)
        CFRunLoopAddTimer(self._cfrunloop, c, kCFRunLoopCommonModes)
