Example #1
0
File: me.py Project: LJS109/pulsar
def wait(actor, period=0.5):
    start = actor._loop.time()
    yield from asyncio.sleep(period)
    return actor._loop.time() - start
Example #2
0
 def __call__(self, consumer, lag=1):
     start = time.time()
     yield asyncio.sleep(lag)
     coroutine_return(time.time() - start)
Example #3
0
def wait(actor, period=0.5):
    start = actor._loop.time()
    yield From(asyncio.sleep(period))
    coroutine_return(actor._loop.time() - start)