RTC: Do not fire timer periodically to catch next alarm
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 2 Aug 2012 16:04:11 +0000 (18:04 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 10 Sep 2012 18:52:28 +0000 (13:52 -0500)
commit00cf57747db98c6a9e4219cea39ac3113dde6993
tree7245e946c73e2989f2d8bad3af1d93b12ecc94b8
parent41a9b8b24d59acec462b0d8e0d2a7ffce6031d55
RTC: Do not fire timer periodically to catch next alarm

This patch limits further the usage of a periodic timer.  It computes the
time of the next alarm, and uses it to skip all intermediate occurrences
of the timer.

Cc: Yang Zhang <yang.z.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/mc146818rtc.c