]> Git Repo - qemu.git/blobdiff - include/qemu/timer.h
qemu-timer: Call clock reset notifiers on forward jumps
[qemu.git] / include / qemu / timer.h
index e5bd494c07b7a63458936631eb08593fd4f6d294..9e4f90f4aaeb55390debf8bf829a0cd3bb6d8824 100644 (file)
@@ -787,6 +787,15 @@ static inline int64_t get_ticks_per_sec(void)
     return 1000000000LL;
 }
 
+static inline int64_t get_max_clock_jump(void)
+{
+    /* This should be small enough to prevent excessive interrupts from being
+     * generated by the RTC on clock jumps, but large enough to avoid frequent
+     * unnecessary resets in idle VMs.
+     */
+    return 60 * get_ticks_per_sec();
+}
+
 /*
  * Low level clock functions
  */
This page took 0.024223 seconds and 4 git commands to generate.