def tornado_sleep(duration):
 return gen.Task(IOLoop.instance().add_timeout, (time.time() + duration))

def tornado_sleep ( duration ) : return gen . Task ( IOLoop . instance ( ) . add_timeout , ( time . time ( ) + duration ) )
sleep without blocking the tornado event loop to use with a gen .