qemu-timer: fix off-by-one
commit33bef0b9948b85000221d32c758d9d4a9276aaaf
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 Mar 2017 10:37:57 +0000 (3 11:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Mar 2017 12:26:42 +0000 (14 13:26 +0100)
treeae77fd8618870614cb1380e2bc10eff57f602e06
parentc0d24e7f70816c8af51ebe9dc74aa276a81858dd
qemu-timer: fix off-by-one

If the first timer is exactly at the current value of the clock, the
deadline is met and the timer should fire.  This fixes itself on the next
iteration of the loop without icount; with icount, however, execution
of instructions will stop exactly at the deadline and won't proceed.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/qemu-timer.c