diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-02-25 12:11:44 -0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-03-08 11:30:09 -0600 |
commit | 80cd34787fc0fc31b1a341c7b8d8e729c1b6ea58 (patch) | |
tree | 87b4d9bb87753831af21d16f6ce011f985fdbd37 /vl.c | |
parent | d74c7dfd1b63850309d7595b4db2e91b78c1dc05 (diff) |
QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1492,6 +1492,15 @@ int qemu_timedate_diff(struct tm *tm) return seconds - time(NULL); } +void rtc_change_mon_event(struct tm *tm) +{ + QObject *data; + + data = qobject_from_jsonf("{ 'offset': %d }", qemu_timedate_diff(tm)); + monitor_protocol_event(QEVENT_RTC_CHANGE, data); + qobject_decref(data); +} + static void configure_rtc_date_offset(const char *startdate, int legacy) { time_t rtc_start_date; |