> +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 deman
From: Kuo-Jung Su
The FTRTC011 is a flexible, small-area, and low-power Real Time Clock (RTC).
It accepts two clock sources: APB bus clock (PCLK) and 32.768 kHz clock.
When the system enters the sleep mode, the PCLK clock will be gated by the
system while RTC will keep on counting. This mechanism