]> git.proxmox.com Git - mirror_qemu.git/blobdiff - util/qemu-timer-common.c
virtio: use defer_call() in virtio_irqfd_notify()
[mirror_qemu.git] / util / qemu-timer-common.c
index baf3317f7456e6d3f2d16bd244f03ba3f04cd467..cc1326f72646c4063adb691b4dc9260ecd172aaf 100644 (file)
@@ -27,6 +27,8 @@
 /***********************************************************/
 /* real time host monotonic timer */
 
+int64_t clock_start;
+
 #ifdef _WIN32
 
 int64_t clock_freq;
@@ -41,6 +43,7 @@ static void __attribute__((constructor)) init_get_clock(void)
         exit(1);
     }
     clock_freq = freq.QuadPart;
+    clock_start = get_clock();
 }
 
 #else
@@ -55,5 +58,6 @@ static void __attribute__((constructor)) init_get_clock(void)
     if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
         use_rt_clock = 1;
     }
+    clock_start = get_clock();
 }
 #endif