> On May 16, 2016, at 11:33 AM, Stefan Hajnoczi <stefa...@gmail.com> wrote: > > The way it's done in the "null" block driver is: > > static coroutine_fn int null_co_common(BlockDriverState *bs) > { > BDRVNullState *s = bs->opaque; > > if (s->latency_ns) { > co_aio_sleep_ns(bdrv_get_aio_context(bs), QEMU_CLOCK_REALTIME, > s->latency_ns); > } > return 0; > }
Thanks so much, Stefan! It seems this is what I need. Best,