'Wait until the next action is needed.'

def Wait(self):

    time.sleep((self.sleep_time - int(self.sleep_time)))
    for _ in xrange(int(self.sleep_time)):
        time.sleep(1)
        if self.heart_beat_cb:
            self.heart_beat_cb()
    self.sleep_time = min(self.poll_max, (max(self.poll_min, self.sleep_time) * self.poll_slew))
