'Returns the recommended next request time in seconds.'

def wait(self):

    if self.history:
        remaining_duration = (self.duration - (self.now - self.history[(-1)]))
    else:
        remaining_duration = self.duration
    available_requests = ((self.num_requests - len(self.history)) + 1)
    if (available_requests <= 0):
        return None
    return (remaining_duration / float(available_requests))
