'Get a timer from the pool or allocate a new one.'

def _get_timer(self, deadline):

    if self._stopped_timers:
        timer = self._stopped_timers.pop()
        timer.set(deadline, 0.0)
    else:
        timer = self.ioloop.timer(deadline, 0.0, self._timer_callback)
    return timer
