Re: [PATCH 5/7] hw/rtc/m48t59: Reduce timer precision to milli-second

2020-07-08 Thread Richard Henderson
On 6/16/20 12:51 AM, Philippe Mathieu-Daudé wrote: > +timer_mod(NVRAM->alrm_timer_ms, > + qemu_clock_get_ms(rtc_clock) + next_time_s * > + NANOSECONDS_PER_SECOND / > SCALE_MS); I'm not keen on this last. I would much prefer a MILLISECO

[PATCH 5/7] hw/rtc/m48t59: Reduce timer precision to milli-second

2020-06-16 Thread Philippe Mathieu-Daudé
The current implementation uses nano-second precision, while the RTC can not be more precise than a milli-second. Simplify by using a milli-second based timer. Rename the timer 'alrm_timer_ms' to have the unit explicit. Inspired-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/