aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/timer.h
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-02-27 12:52:26 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 16:12:50 +0100
commit4b930d264cea0d72e775a7a57a8fce79158e8c10 (patch)
tree72ff9353ece1c71d1673895c21ec79820305b061 /include/qemu/timer.h
parentbb040e006f0245ca376b45dc5ea247f6e1f02648 (diff)
downloadqemu-4b930d264cea0d72e775a7a57a8fce79158e8c10.zip
qemu-4b930d264cea0d72e775a7a57a8fce79158e8c10.tar.gz
qemu-4b930d264cea0d72e775a7a57a8fce79158e8c10.tar.bz2
replay: save prior value of the host clock
This patch adds saving/restoring of the host clock field 'last'. It is used in host clock calculation and therefore clock may become incorrect when using restored vmstate. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095226.1060.50975.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'include/qemu/timer.h')
-rw-r--r--include/qemu/timer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index 3b5a54b..39ea907 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -251,6 +251,20 @@ bool qemu_clock_run_timers(QEMUClockType type);
*/
bool qemu_clock_run_all_timers(void);
+/**
+ * qemu_clock_get_last:
+ *
+ * Returns last clock query time.
+ */
+uint64_t qemu_clock_get_last(QEMUClockType type);
+/**
+ * qemu_clock_set_last:
+ *
+ * Sets last clock query time.
+ */
+void qemu_clock_set_last(QEMUClockType type, uint64_t last);
+
+
/*
* QEMUTimerList
*/