'Adds a callback to be run every period_milliseconds until it is removed.'

def add_periodic_callback(self, callback, period_milliseconds, cleanup=None):

    if (callback in self._periodic_callbacks):
        raise ValueError('Callback    added    as    a    periodic    callback    twice')
    cb = _AsyncPeriodic(callback, period_milliseconds, io_loop=self._loop)
    def remover():
        cb.stop()
        self._remover(callback, self._periodic_callbacks, cleanup)
    self._periodic_callbacks[callback] = remover
    cb.start()
    return remover
