def __call__(self, consumer, lag=1): start = time.time() yield asyncio.sleep(lag) coroutine_return(time.time() - start)
def wait(actor, period=0.5): start = actor._loop.time() yield from asyncio.sleep(period) return actor._loop.time() - start
def wait(actor, period=0.5): start = actor._loop.time() yield From(asyncio.sleep(period)) coroutine_return(actor._loop.time() - start)