示例#1
0
 def __call__(self, consumer, lag=1):
     start = time.time()
     yield asyncio.sleep(lag)
     coroutine_return(time.time() - start)
示例#2
0
文件: me.py 项目: LJS109/pulsar
def wait(actor, period=0.5):
    start = actor._loop.time()
    yield from asyncio.sleep(period)
    return actor._loop.time() - start
示例#3
0
文件: me.py 项目: LJS109/pulsar
def wait(actor, period=0.5):
    start = actor._loop.time()
    yield from asyncio.sleep(period)
    return actor._loop.time() - start
示例#4
0
文件: me.py 项目: robgil/pulsar
def wait(actor, period=0.5):
    start = actor._loop.time()
    yield From(asyncio.sleep(period))
    coroutine_return(actor._loop.time() - start)