code: def _delay(self):
          
          if not self.next_scheduled:
              self.next_scheduled = self.clock_func() + self.interval
              return
          while True:
              current = self.clock_func()
              if current >= self.next_scheduled:
                  extratime = current - self.next_scheduled
                  self.next_scheduled = current + self.interval - extratime
                  return
              delay_amt = self.next_scheduled - current
              #Call for 0, because that might be meaningful to sleep_func.
              if self.allow_negative_sleep or delay_amt >= 0: 
                  self.sleep_func(self.next_scheduled - current)
docs: Delay for between zero and self.interval time units