On Mon, Sep 08, 2014 at 04:29:26PM +0200, Paolo Bonzini wrote:
> Il 08/09/2014 14:18, Benoît Canet ha scritto:
> > The algorithm used was defined on the list while discussing the new IO 
> > accounting
> > overhaul.
> > See http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04954.html
> > 
> > Also the module takes care of computing minimal and maximal values over the 
> > time
> > slice duration.
> > 
> > Signed-off-by: Benoît Canet <benoit.ca...@nodalink.com>
> 
> If you add
> 
> int64_t cpu_get_clock(void)
> {
>     return my_clock_value;
> }
> 
> to the test, and use a QEMU_CLOCK_VIRTUAL-based average, you should be
> able to advance the clock directly in the test with no need for sleep()
> and with 100% deterministic results.

That's a really neat trick. Thanks


Reply via email to