> +    qemu_mod_timer(s->qtimer,
> +            qemu_get_clock_ns(vm_clock) + get_ticks_per_sec());

This will not work reliably.  You can not rely on timers triggering promptly.  
Plus you're loosing the time taken to execute the callback every tick.

Additionally you can calculate values on demand, and only trigger a timer tick 
when an interrupt is actually enabled.  You don't need high precision, so use 
timer_ms rather than timer_ns.

Paul

Reply via email to